diff options
author | skerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-30 16:16:18 +0000 |
---|---|---|
committer | skerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-30 16:16:18 +0000 |
commit | e4f976498a9a229633529c8468209e6877da0472 (patch) | |
tree | 32d9b1368d7e85e894324b31a2bd495f00ffb18e /base | |
parent | 80bebf48af21c4470b0732919df363f5ba8e52ab (diff) | |
download | chromium_src-e4f976498a9a229633529c8468209e6877da0472.zip chromium_src-e4f976498a9a229633529c8468209e6877da0472.tar.gz chromium_src-e4f976498a9a229633529c8468209e6877da0472.tar.bz2 |
Give a better error when extension unpacking can't be done.
The sandbox can not allow file access to paths that contain reparse points. Chrome tries to find a reparse point free path to the directory which will be sandboxed for extension unpacking. However, there are cases where there is no such path. See the bug for an example. In this case, give a decent error message.
BUG=49530
TEST=Manually created a partition mounted in C:/mnt, mounted as drive letter, and mounted only under /Devices/HardDisk3/, tried unpacking extensions in each.
Review URL: http://codereview.chromium.org/3060026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54327 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/file_util_win.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/base/file_util_win.cc b/base/file_util_win.cc index b6a741b..2181516 100644 --- a/base/file_util_win.cc +++ b/base/file_util_win.cc @@ -59,9 +59,10 @@ bool DevicePathToDriveLetterPath(const FilePath& device_path, while(*drive_map_ptr++); } - // No drive matched. The path does not start with a device junction. - *drive_letter_path = device_path; - return true; + // No drive matched. The path does not start with a device junction + // that is mounted as a drive letter. This means there is no drive + // letter path to the volume that holds |device_path|, so fail. + return false; } } // namespace |