Changeset 39585 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Dec 12, 2011 3:35:46 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 75349
- Location:
- trunk/src/VBox/Main/src-client
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestCtrlImplDir.cpp
r39418 r39585 494 494 { 495 495 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()) 503 497 { 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 } 507 514 } 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; 514 517 515 518 if (pRC) -
trunk/src/VBox/Main/src-client/GuestCtrlImplFile.cpp
r39418 r39585 146 146 { 147 147 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 150 168 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 }164 169 165 170 if (pRC)
Note:
See TracChangeset
for help on using the changeset viewer.