Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(528)

Unified Diff: ui/file_manager/file_manager/foreground/js/file_transfer_controller.js

Issue 2548363004: Disallow dropping or pasting files to a volume with unrecognized partition. (Closed)
Patch Set: refer the right field name Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
diff --git a/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js b/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
index 337c5e431c0ee864176401126435b8d5d3728da3..6eba9d64e2d50d77293e065fa60e04dd54bf4456 100644
--- a/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
+++ b/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
@@ -1202,6 +1202,8 @@ FileTransferController.prototype.canPasteOrDrop_ =
return false;
var destinationLocationInfo =
this.volumeManager_.getLocationInfo(destinationEntry);
+ if (destinationLocationInfo.volumeInfo.error)
+ return false;
if (!destinationLocationInfo || destinationLocationInfo.isReadOnly)
return false;
if (!clipboardData.types || clipboardData.types.indexOf('fs/tag') === -1)
@@ -1328,6 +1330,8 @@ FileTransferController.prototype.selectDropEffect_ =
this.volumeManager_.getLocationInfo(destinationEntry);
if (!destinationLocationInfo)
return new DropEffectAndLabel(DropEffectType.NONE, null);
+ if (destinationLocationInfo.volumeInfo.error)
+ return new DropEffectAndLabel(DropEffectType.NONE, null);
if (destinationLocationInfo.isReadOnly) {
if (destinationLocationInfo.isSpecialSearchRoot) {
// The location is a fake entry that corresponds to special search.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698