| Index: chrome/browser/resources/file_manager/foreground/js/file_transfer_controller.js
|
| diff --git a/chrome/browser/resources/file_manager/foreground/js/file_transfer_controller.js b/chrome/browser/resources/file_manager/foreground/js/file_transfer_controller.js
|
| index b99b42f9a73eea4aae98f5c77317159e96d6d7c6..1cfe042f4c6ba7032685bc1909b398d5601f0f6f 100644
|
| --- a/chrome/browser/resources/file_manager/foreground/js/file_transfer_controller.js
|
| +++ b/chrome/browser/resources/file_manager/foreground/js/file_transfer_controller.js
|
| @@ -240,13 +240,6 @@ FileTransferController.prototype = {
|
| paste: function(dataTransfer, opt_destinationEntry, opt_effect) {
|
| var sourceURLs = dataTransfer.getData('fs/sources') ?
|
| dataTransfer.getData('fs/sources').split('\n') : [];
|
| - util.URLsToEntries(sourceURLs, function(sourceEntries) {
|
| - var destinationEntry =
|
| - opt_destinationEntry || this.currentDirectoryContentEntry;
|
| - // Start the pasting operation.
|
| - this.fileOperationManager_.paste(sourceEntries, destinationEntry, toMove);
|
| - }.bind(this));
|
| -
|
| // effectAllowed set in copy/paste handlers stay uninitialized. DnD handlers
|
| // work fine.
|
| var effectAllowed = dataTransfer.effectAllowed !== 'uninitialized' ?
|
| @@ -254,6 +247,21 @@ FileTransferController.prototype = {
|
| var toMove = effectAllowed === 'move' ||
|
| (effectAllowed === 'copyMove' && opt_effect === 'move');
|
|
|
| + util.URLsToEntries(sourceURLs, function(sourceEntries) {
|
| + var destinationEntry =
|
| + opt_destinationEntry || this.currentDirectoryContentEntry;
|
| + // Start the pasting operation.
|
| + this.fileOperationManager_.paste(sourceEntries, destinationEntry, toMove);
|
| + }.bind(this), function(urls) {
|
| + for (var i = 0; i < urls.length; i++) {
|
| + var fileName = decodeURIComponent(urls[i].replace(/^.+\//, ''));
|
| + var event = new Event('source-not-found');
|
| + event.fileName = fileName;
|
| + event.progressType =
|
| + toMove ? ProgressItemType.MOVE : ProgressItemType.COPY;
|
| + this.dispatchEvent(event);
|
| + }
|
| + }.bind(this));
|
| return toMove ? 'move' : 'copy';
|
| },
|
|
|
|
|