chromeos: Fix wrong ZipSelectionFunction src_dir check

GetLocalPathFromURL returns the logical path, not the cache path of the entry.

BUG=None

Review URL: https://chromiumcodereview.appspot.com/14320015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195206 0039d316-1c4b-4281-b951-d872f2087c98
parent 90391be9
...@@ -3222,12 +3222,9 @@ bool ZipSelectionFunction::RunImpl() { ...@@ -3222,12 +3222,9 @@ bool ZipSelectionFunction::RunImpl() {
if (!args_->GetString(2, &dest_name) || dest_name.empty()) if (!args_->GetString(2, &dest_name) || dest_name.empty())
return false; return false;
// Check if the dir path is under Drive cache directory. // Check if the dir path is under Drive mount point.
// TODO(hshi): support create zip file on Drive (crbug.com/158690). // TODO(hshi): support create zip file on Drive (crbug.com/158690).
drive::DriveSystemService* system_service = if (drive::util::IsUnderDriveMountPoint(src_dir))
drive::DriveSystemServiceFactory::GetForProfile(profile_);
drive::DriveCache* cache = system_service ? system_service->cache() : NULL;
if (cache && cache->IsUnderDriveCacheDirectory(src_dir))
return false; return false;
base::FilePath dest_file = src_dir.Append(dest_name); base::FilePath dest_file = src_dir.Append(dest_name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment