Index: chrome/browser/resources/file_manager/background/js/file_operation_manager.js |
diff --git a/chrome/browser/resources/file_manager/background/js/file_operation_manager.js b/chrome/browser/resources/file_manager/background/js/file_operation_manager.js |
index e305867552f8447ae0a6990990e3f805c4241b64..add481a520b921ae65cf9279310bc5199b989bef 100644 |
--- a/chrome/browser/resources/file_manager/background/js/file_operation_manager.js |
+++ b/chrome/browser/resources/file_manager/background/js/file_operation_manager.js |
@@ -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; |
}; |
/** |