VirtualBox

Changeset 15945 in vbox


Ignore:
Timestamp:
Jan 14, 2009 4:52:20 PM (16 years ago)
Author:
vboxsync
Message:

Main: Pass inaccessible shared folders to the guest instead of silently ignoring them (#2425).

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r15762 r15945  
    21052105    rc = sharedFolder->init (this, aName, aHostPath, aWritable);
    21062106    CheckComRCReturnRC (rc);
    2107 
    2108     BOOL accessible = FALSE;
    2109     rc = sharedFolder->COMGETTER(Accessible) (&accessible);
    2110     CheckComRCReturnRC (rc);
    2111 
    2112     if (!accessible)
    2113         return setError (VBOX_E_FILE_ERROR,
    2114             tr ("Shared folder host path '%ls' is not accessible"), aHostPath);
    21152107
    21162108    /* protect mpVM (if not NULL) */
  • trunk/src/VBox/Main/MachineImpl.cpp

    r15888 r15945  
    28702870    rc = sharedFolder->init (machine(), aName, aHostPath, aWritable);
    28712871    CheckComRCReturnRC (rc);
    2872 
    2873     BOOL accessible = FALSE;
    2874     rc = sharedFolder->COMGETTER(Accessible) (&accessible);
    2875     CheckComRCReturnRC (rc);
    2876 
    2877     if (!accessible)
    2878         return setWarning (VBOX_E_FILE_ERROR,
    2879             tr ("Shared folder host path '%ls' is not accessible"), aHostPath);
    28802872
    28812873    mHWData.backup();
  • trunk/src/VBox/Main/SharedFolderImpl.cpp

    r15051 r15945  
    293293    Utf8Str hostPath = Utf8Str (mData.mHostPath);
    294294    char hostPathFull [RTPATH_MAX];
    295     int vrc = RTPathExists(hostPath) ? RTPathReal (hostPath, hostPathFull,
    296                                                    sizeof (hostPathFull))
    297                                      : VERR_PATH_NOT_FOUND;
     295    int vrc = RTPathExists (hostPath) ? RTPathReal (hostPath, hostPathFull,
     296                                                    sizeof (hostPathFull))
     297                                      : VERR_PATH_NOT_FOUND;
    298298    if (RT_SUCCESS (vrc))
    299299    {
     
    302302    }
    303303
    304     HRESULT rc = S_OK;
    305     if (vrc != VERR_PATH_NOT_FOUND)
    306         rc = setError (E_FAIL,
    307             tr ("Invalid shared folder path: '%s' (%Rrc)"), hostPath.raw(), vrc);
    308 
    309304    LogWarningThisFunc (("'%s' is not accessible (%Rrc)\n", hostPath.raw(), vrc));
    310305
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette