Changeset 99391 in vbox for trunk/src/VBox
- Timestamp:
- Apr 13, 2023 4:41:39 PM (23 months ago)
- svn:sync-xref-src-repo-rev:
- 156829
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.h
r98103 r99391 820 820 bool isReallyOk() const { return !isNull() && B::mRC == S_OK; } 821 821 822 /** 823 * Returns the last result code of this interface. 824 */ 825 HRESULT rc() const { return B::mRC; } 826 822 827 // utility operators 823 828 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.cpp
r99089 r99391 528 528 if (directory.isOk()) 529 529 { 530 int const cMaxEntries = _4K; /* Maximum number of entries to read at once per List() call. */ 530 int const cMaxEntries = _4K; /* Maximum number of entries to read at once per List() call. */ 531 bool fUseRead = false; /* Whether to use the Read() API or the newer (faster) List() call. */ 531 532 532 533 QVector<CFsObjInfo> vecFsInfo = directory.List(cMaxEntries); 534 /* IGuestDirectory::List() will return VBOX_E_NOT_SUPPORTED if older Guest Additions are installed. */ 535 if (directory.rc() == VBOX_E_NOT_SUPPORTED) 536 { 537 CFsObjInfo fsInfo = directory.Read(); 538 if (directory.isOk()) 539 { 540 vecFsInfo.push_back(fsInfo); 541 fUseRead = true; 542 } 543 } 544 533 545 QMap<QString, UICustomFileSystemItem*> fileObjects; 534 546 … … 564 576 } 565 577 566 vecFsInfo = directory.List(cMaxEntries); 578 if (fUseRead) 579 { 580 CFsObjInfo fsInfo = directory.Read(); 581 if (directory.isOk()) 582 { 583 vecFsInfo.clear(); 584 vecFsInfo.push_back(fsInfo); 585 } 586 } 587 else 588 vecFsInfo = directory.List(cMaxEntries); 567 589 } 568 590
Note:
See TracChangeset
for help on using the changeset viewer.