VirtualBox

Changeset 41003 in vbox


Ignore:
Timestamp:
Apr 20, 2012 8:05:06 AM (13 years ago)
Author:
vboxsync
Message:

Main/MediumImpl: correct error code if a medium file is not accessible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/MediumImpl.cpp

    r40542 r41003  
    59785978                                  locationFull.c_str(), &backendName, &enmType);
    59795979            }
    5980             else if (vrc != VERR_FILE_NOT_FOUND && vrc != VERR_PATH_NOT_FOUND)
     5980            else if (   vrc != VERR_FILE_NOT_FOUND
     5981                     && vrc != VERR_PATH_NOT_FOUND
     5982                     && vrc != VERR_ACCESS_DENIED)
    59815983            {
    59825984                /* assume it's not a file, restore the original location */
     
    59885990            if (RT_FAILURE(vrc))
    59895991            {
    5990                 if (vrc == VERR_FILE_NOT_FOUND || vrc == VERR_PATH_NOT_FOUND)
     5992                if (vrc == VERR_ACCESS_DENIED)
     5993                    return setError(VBOX_E_FILE_ERROR,
     5994                                    tr("Permission problem accessing the file for the medium '%s' (%Rrc)"),
     5995                                    locationFull.c_str(), vrc);
     5996                else if (vrc == VERR_FILE_NOT_FOUND || vrc == VERR_PATH_NOT_FOUND)
    59915997                    return setError(VBOX_E_FILE_ERROR,
    59925998                                    tr("Could not find file for the medium '%s' (%Rrc)"),
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