~ubuntu-branches/ubuntu/quantal/virtualbox/quantal

« back to all changes in this revision

Viewing changes to src/VBox/Main/src-server/MediumImpl.cpp

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2012-05-29 10:09:31 UTC
  • mfrom: (3.1.15 sid)
  • Revision ID: package-import@ubuntu.com-20120529100931-2xayrbh5hyzm6e9p
Tags: 4.1.16-dfsg-1
* New upstream release.
* Drop 37-fix-build-gcc47.patch, fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5891
5891
                vrc = VDGetFormat(NULL /* pVDIfsDisk */, NULL /* pVDIfsImage */,
5892
5892
                                  locationFull.c_str(), &backendName, &enmType);
5893
5893
            }
5894
 
            else if (vrc != VERR_FILE_NOT_FOUND && vrc != VERR_PATH_NOT_FOUND)
 
5894
            else if (   vrc != VERR_FILE_NOT_FOUND
 
5895
                     && vrc != VERR_PATH_NOT_FOUND
 
5896
                     && vrc != VERR_ACCESS_DENIED)
5895
5897
            {
5896
5898
                /* assume it's not a file, restore the original location */
5897
5899
                locationFull = aLocation;
5901
5903
 
5902
5904
            if (RT_FAILURE(vrc))
5903
5905
            {
5904
 
                if (vrc == VERR_FILE_NOT_FOUND || vrc == VERR_PATH_NOT_FOUND)
 
5906
                if (vrc == VERR_ACCESS_DENIED)
 
5907
                    return setError(VBOX_E_FILE_ERROR,
 
5908
                                    tr("Permission problem accessing the file for the medium '%s' (%Rrc)"),
 
5909
                                    locationFull.c_str(), vrc);
 
5910
                else if (vrc == VERR_FILE_NOT_FOUND || vrc == VERR_PATH_NOT_FOUND)
5905
5911
                    return setError(VBOX_E_FILE_ERROR,
5906
5912
                                    tr("Could not find file for the medium '%s' (%Rrc)"),
5907
5913
                                    locationFull.c_str(), vrc);