Changeset 77072 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Jan 31, 2019 12:41:00 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 128522
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r77070 r77072 1576 1576 } 1577 1577 1578 /** 1579 * Queries information from a file on the guest. 1580 * 1581 * @returns IPRT status code. VERR_NOT_A_FILE if the queried file system object on the guest is not a file, 1582 * or VERR_GSTCTL_GUEST_ERROR if prcGuest contains more error information from the guest. 1583 * @param strPath Absolute path of file to query information for. 1584 * @param fFollowSymlinks Whether or not to follow symbolic links on the guest. 1585 * @param objData Where to store the acquired information. 1586 * @param prcGuest Where to store the guest rc. Optional. 1587 */ 1578 1588 int GuestSession::i_fileQueryInfo(const Utf8Str &strPath, bool fFollowSymlinks, GuestFsObjData &objData, int *prcGuest) 1579 1589 { … … 3566 3576 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3567 3577 3578 /* By default we return non-existent. */ 3579 *aExists = FALSE; 3580 3568 3581 if (RT_UNLIKELY((aPath.c_str()) == NULL || *(aPath.c_str()) == '\0')) 3569 {3570 *aExists = FALSE;3571 3582 return S_OK; 3572 }3573 3583 3574 3584 HRESULT hrc = i_isReadyExternal(); … … 3579 3589 3580 3590 GuestFsObjData objData; int rcGuest; 3581 int vrc = i_fileQueryInfo(aPath, aFollowSymlinks != FALSE, objData, &rcGuest);3591 int vrc = i_fileQueryInfo(aPath, RT_BOOL(aFollowSymlinks), objData, &rcGuest); 3582 3592 if (RT_SUCCESS(vrc)) 3583 3593 { … … 3589 3599 { 3590 3600 case VERR_GSTCTL_GUEST_ERROR: 3591 hrc = GuestProcess::i_setErrorExternal(this, rcGuest); 3601 { 3602 switch (rcGuest) 3603 { 3604 case VERR_PATH_NOT_FOUND: 3605 RT_FALL_THROUGH(); 3606 case VERR_FILE_NOT_FOUND: 3607 break; 3608 3609 default: 3610 hrc = GuestProcess::i_setErrorExternal(this, rcGuest); 3611 break; 3612 } 3613 3592 3614 break; 3593 3594 /** @todo r=bird: what about VERR_PATH_NOT_FOUND and VERR_FILE_NOT_FOUND? 3595 * Where does that get converted to *aExists = FALSE? */ 3615 } 3616 3596 3617 case VERR_NOT_A_FILE: 3597 *aExists = FALSE;3598 3618 break; 3599 3619
Note:
See TracChangeset
for help on using the changeset viewer.