VirtualBox

Changeset 39585 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Dec 12, 2011 3:35:46 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
75349
Message:

Removed assertion.

Location:
trunk/src/VBox/Main/src-client
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestCtrlImplDir.cpp

    r39418 r39585  
    494494        {
    495495            int rc = VINF_SUCCESS;
    496 
    497             Assert(stdOut.size());
    498             const char *pszFsType = stdOut[0].GetString("ftype");
    499             if (!pszFsType) /* Attribute missing? */
    500                  rc = VERR_NOT_FOUND;
    501             if (   RT_SUCCESS(rc)
    502                 && strcmp(pszFsType, "d")) /* Directory? */
     496            if (stdOut.size())
    503497            {
    504                  rc = VERR_FILE_NOT_FOUND;
    505                  /* This is not critical for Main, so don't set hr --
    506                   * we will take care of rc then. */
     498                const char *pszFsType = stdOut[0].GetString("ftype");
     499                if (!pszFsType) /* Attribute missing? */
     500                     rc = VERR_NOT_FOUND;
     501                if (   RT_SUCCESS(rc)
     502                    && strcmp(pszFsType, "d")) /* Directory? */
     503                {
     504                     rc = VERR_FILE_NOT_FOUND;
     505                     /* This is not critical for Main, so don't set hr --
     506                      * we will take care of rc then. */
     507                }
     508                if (   RT_SUCCESS(rc)
     509                    && aObjInfo) /* Do we want object details? */
     510                {
     511                    hr = executeStreamQueryFsObjInfo(aDirectory, stdOut[0],
     512                                                     aObjInfo, enmAddAttribs);
     513                }
    507514            }
    508             if (   RT_SUCCESS(rc)
    509                 && aObjInfo) /* Do we want object details? */
    510             {
    511                 hr = executeStreamQueryFsObjInfo(aDirectory, stdOut[0],
    512                                                  aObjInfo, enmAddAttribs);
    513             }
     515            else
     516                rc = VERR_NOT_FOUND;
    514517
    515518            if (pRC)
  • trunk/src/VBox/Main/src-client/GuestCtrlImplFile.cpp

    r39418 r39585  
    146146        {
    147147            int rc = VINF_SUCCESS;
    148             const char *pszFsType = stdOut[0].GetString("ftype");
    149             if (!pszFsType) /* Attribute missing? */
     148            if (stdOut.size())
     149            {
     150                const char *pszFsType = stdOut[0].GetString("ftype");
     151                if (!pszFsType) /* Attribute missing? */
     152                    rc = VERR_NOT_FOUND;
     153                if (   RT_SUCCESS(rc)
     154                    && strcmp(pszFsType, "-")) /* Regular file? */
     155                {
     156                    rc = VERR_FILE_NOT_FOUND;
     157                    /* This is not critical for Main, so don't set hr --
     158                     * we will take care of rc then. */
     159                }
     160                if (   RT_SUCCESS(rc)
     161                    && aObjInfo) /* Do we want object details? */
     162                {
     163                    hr = executeStreamQueryFsObjInfo(aFile, stdOut[0],
     164                                                     aObjInfo, enmAddAttribs);
     165                }
     166            }
     167            else
    150168                rc = VERR_NOT_FOUND;
    151             if (   RT_SUCCESS(rc)
    152                 && strcmp(pszFsType, "-")) /* Regular file? */
    153             {
    154                 rc = VERR_FILE_NOT_FOUND;
    155                 /* This is not critical for Main, so don't set hr --
    156                  * we will take care of rc then. */
    157             }
    158             if (   RT_SUCCESS(rc)
    159                 && aObjInfo) /* Do we want object details? */
    160             {
    161                 hr = executeStreamQueryFsObjInfo(aFile, stdOut[0],
    162                                                  aObjInfo, enmAddAttribs);
    163             }
    164169
    165170            if (pRC)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette