VirtualBox

Ignore:
Timestamp:
Aug 12, 2011 3:05:41 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
73482
Message:

GuestCtrl: Update.

File:
1 edited

Legend:

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

    r38400 r38437  
    233233    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    234234
    235     RTFSOBJINFO objInfo;
    236235    int rc;
    237236    HRESULT hr = directoryQueryInfoInternal(aDirectory,
    238237                                            aUsername, aPassword,
    239                                             &objInfo, RTFSOBJATTRADD_NOTHING, &rc);
     238                                            NULL /* No RTFSOBJINFO needed */,
     239                                            RTFSOBJATTRADD_NOTHING, &rc);
    240240    if (SUCCEEDED(hr))
    241241    {
     
    283283/**
    284284 * 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.
    286287 *
    287288 * @return  IPRT status code.
     
    486487                int rc = VINF_SUCCESS;
    487488
    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");
    491491                if (!pszFsType) /* Attribute missing? */
    492492                     rc = VERR_NOT_FOUND;
     
    495495                {
    496496                     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. */
    497499                }
    498500                if (   RT_SUCCESS(rc)
    499501                    && aObjInfo) /* Do we want object details? */
    500502                {
    501                     hr = executeStreamQueryFsObjInfo(aDirectory, pBlock,
     503                    hr = executeStreamQueryFsObjInfo(aDirectory, streamObjs[0],
    502504                                                     aObjInfo, enmAddAttribs);
    503505                }
     
    541543            ComAssertComRC(hr);
    542544
     545            Assert(streamBlock.GetCount());
    543546            hr = pDirEntry->init(this, streamBlock);
    544547            if (SUCCEEDED(hr))
     
    548551            else
    549552                hr = setError(VBOX_E_IPRT_ERROR,
    550                               Guest::tr("Unable to 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. */
    555558            hr = E_ABORT; /** @todo Find/define a better rc! */
    556559        }
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