summaryrefslogtreecommitdiffstats
path: root/webkit/chromeos
diff options
context:
space:
mode:
authordgozman@chromium.org <dgozman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-26 11:34:09 +0000
committerdgozman@chromium.org <dgozman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-26 11:34:09 +0000
commit5d4c6733c7d7ae58550bb946b94aad764a4afee5 (patch)
treeedcfa62cff62a6e3cb63c916ca03c16442ea7760 /webkit/chromeos
parentac11bab7dbf1b554fb997ee552178c01b6733280 (diff)
downloadchromium_src-5d4c6733c7d7ae58550bb946b94aad764a4afee5.zip
chromium_src-5d4c6733c7d7ae58550bb946b94aad764a4afee5.tar.gz
chromium_src-5d4c6733c7d7ae58550bb946b94aad764a4afee5.tar.bz2
[cros] Fix the GetVirtualPath to always return the path without leading slash (as expected by clients).
BUG=chromium-os:24641 TEST=See bug. Review URL: http://codereview.chromium.org/9251010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119226 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/chromeos')
-rw-r--r--webkit/chromeos/fileapi/cros_mount_point_provider.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/webkit/chromeos/fileapi/cros_mount_point_provider.cc b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
index 61bacd2..d2804af 100644
--- a/webkit/chromeos/fileapi/cros_mount_point_provider.cc
+++ b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
@@ -200,11 +200,9 @@ bool CrosMountPointProvider::GetVirtualPath(const FilePath& filesystem_path,
++iter) {
FilePath mount_prefix = iter->second.Append(iter->first);
*virtual_path = FilePath(iter->first);
- if (mount_prefix.AppendRelativePath(filesystem_path, virtual_path)) {
+ if (mount_prefix == filesystem_path) {
return true;
- } else if (mount_prefix == filesystem_path) {
- FilePath root = FilePath(FILE_PATH_LITERAL("/"));
- *virtual_path = root.Append(iter->first);
+ } else if (mount_prefix.AppendRelativePath(filesystem_path, virtual_path)) {
return true;
}
}