Commit 3151a82a authored by mtomasz@chromium.org's avatar mtomasz@chromium.org

Remove the last occurence of fullPath from file_operation_manager.js.

This patch removes working on fullPath from the isMovable() method. Instead the volume manager is used.

TEST=Tested manually, also partly covered by browser tests.
BUG=329435

Review URL: https://codereview.chromium.org/130353002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243847 0039d316-1c4b-4281-b951-d872f2087c98
parent 8f6e877d
......@@ -1172,11 +1172,12 @@ FileOperationManager.prototype.paste = function(
*/
FileOperationManager.prototype.isMovable = function(
sourceEntry, targetDirEntry) {
// TODO(mtomasz): Use the volume manager instead of full paths.
return (PathUtil.isDriveBasedPath(sourceEntry.fullPath) &&
PathUtil.isDriveBasedPath(targetDirEntry.fullPath)) ||
(PathUtil.getRootPath(sourceEntry.fullPath) ==
PathUtil.getRootPath(targetDirEntry.fullPath));
var sourceLocationInfo = this.volumeManager_.getLocationInfo(sourceEntry);
var targetDirLocationInfo = this.volumeManager_.getLocationInfo(
targetDirEntry);
return sourceLocationInfo && targetDirLocationInfo &&
sourceLocationInfo.volumeInfo === targetDirLocationInfo.volumeInfo;
};
/**
......
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