Changeset 39418 in vbox for trunk/src/VBox/Main/src-client/GuestCtrlImplFile.cpp
- Timestamp:
- Nov 25, 2011 10:11:06 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 75045
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestCtrlImplFile.cpp
r38627 r39418 135 135 */ 136 136 ULONG uPID; 137 GuestCtrlStreamObjects stdOut; 137 138 hr = executeAndWaitForTool(Bstr(VBOXSERVICE_TOOL_STAT).raw(), Bstr("Querying file information").raw(), 138 139 ComSafeArrayAsInParam(args), 139 140 ComSafeArrayAsInParam(env), 140 141 aUsername, aPassword, 142 ExecuteProcessFlag_WaitForStdOut, 143 &stdOut, NULL, 141 144 NULL /* Progress */, &uPID); 142 145 if (SUCCEEDED(hr)) 143 146 { 144 GuestCtrlStreamObjects streamObjs; 145 hr = executeStreamParse(uPID, streamObjs); 146 if (SUCCEEDED(hr)) 147 int rc = VINF_SUCCESS; 148 const char *pszFsType = stdOut[0].GetString("ftype"); 149 if (!pszFsType) /* Attribute missing? */ 150 rc = VERR_NOT_FOUND; 151 if ( RT_SUCCESS(rc) 152 && strcmp(pszFsType, "-")) /* Regular file? */ 147 153 { 148 int rc = VINF_SUCCESS; 149 const char *pszFsType = streamObjs[0].GetString("ftype"); 150 if (!pszFsType) /* Attribute missing? */ 151 rc = VERR_NOT_FOUND; 152 if ( RT_SUCCESS(rc) 153 && strcmp(pszFsType, "-")) /* Regular file? */ 154 { 155 rc = VERR_FILE_NOT_FOUND; 156 /* This is not critical for Main, so don't set hr -- 157 * we will take care of rc then. */ 158 } 159 if ( RT_SUCCESS(rc) 160 && aObjInfo) /* Do we want object details? */ 161 { 162 hr = executeStreamQueryFsObjInfo(aFile, streamObjs[0], 163 aObjInfo, enmAddAttribs); 164 } 165 166 if (pRC) 167 *pRC = rc; 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. */ 168 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 165 if (pRC) 166 *pRC = rc; 169 167 } 170 168 }
Note:
See TracChangeset
for help on using the changeset viewer.