Changeset 38437 in vbox for trunk/src/VBox/Main/src-client/GuestCtrlImplDir.cpp
- Timestamp:
- Aug 12, 2011 3:05:41 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 73482
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestCtrlImplDir.cpp
r38400 r38437 233 233 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 234 234 235 RTFSOBJINFO objInfo;236 235 int rc; 237 236 HRESULT hr = directoryQueryInfoInternal(aDirectory, 238 237 aUsername, aPassword, 239 &objInfo, RTFSOBJATTRADD_NOTHING, &rc); 238 NULL /* No RTFSOBJINFO needed */, 239 RTFSOBJATTRADD_NOTHING, &rc); 240 240 if (SUCCEEDED(hr)) 241 241 { … … 283 283 /** 284 284 * Returns the next directory entry of an open guest directory. 285 * Returns VERR_NO_MORE_FILES if no more entries available. 285 * Returns VERR_NO_DATA if no more entries available or VERR_NOT_FOUND 286 * if directory handle is invalid. 286 287 * 287 288 * @return IPRT status code. … … 486 487 int rc = VINF_SUCCESS; 487 488 488 GuestProcessStreamBlock *pBlock = streamObjs[0]; 489 AssertPtr(pBlock); 490 const char *pszFsType = pBlock->GetString("ftype"); 489 Assert(streamObjs.size()); 490 const char *pszFsType = streamObjs[0].GetString("ftype"); 491 491 if (!pszFsType) /* Attribute missing? */ 492 492 rc = VERR_NOT_FOUND; … … 495 495 { 496 496 rc = VERR_FILE_NOT_FOUND; 497 /* This is not critical for Main, so don't set hr -- 498 * we will take care of rc then. */ 497 499 } 498 500 if ( RT_SUCCESS(rc) 499 501 && aObjInfo) /* Do we want object details? */ 500 502 { 501 hr = executeStreamQueryFsObjInfo(aDirectory, pBlock,503 hr = executeStreamQueryFsObjInfo(aDirectory, streamObjs[0], 502 504 aObjInfo, enmAddAttribs); 503 505 } … … 541 543 ComAssertComRC(hr); 542 544 545 Assert(streamBlock.GetCount()); 543 546 hr = pDirEntry->init(this, streamBlock); 544 547 if (SUCCEEDED(hr)) … … 548 551 else 549 552 hr = setError(VBOX_E_IPRT_ERROR, 550 Guest::tr(" Unableto init guest directory entry"));551 } 552 else if (rc == VERR_NO_ MORE_FILES)553 { 554 /* No more directory entries to read. */553 Guest::tr("Failed to init guest directory entry")); 554 } 555 else if (rc == VERR_NO_DATA) 556 { 557 /* No more directory entries to read. That's fine. */ 555 558 hr = E_ABORT; /** @todo Find/define a better rc! */ 556 559 }
Note:
See TracChangeset
for help on using the changeset viewer.