summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/file_manager/file_manager/foreground/js/directory_contents.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/ui/file_manager/file_manager/foreground/js/directory_contents.js b/ui/file_manager/file_manager/foreground/js/directory_contents.js
index 336e62d..486d4ca 100644
--- a/ui/file_manager/file_manager/foreground/js/directory_contents.js
+++ b/ui/file_manager/file_manager/foreground/js/directory_contents.js
@@ -678,10 +678,11 @@ DirectoryContents.prototype.onNewEntries_ = function(refresh, entries) {
this.processNewEntriesQueue_.run(function(callbackOuter) {
var finish = function() {
- // Update the filelist without waiting the metadata.
- this.fileList_.push.apply(this.fileList_, entriesFiltered);
- cr.dispatchSimpleEvent(this, 'scan-updated');
-
+ if (!this.scanCancelled_) {
+ // Update the filelist without waiting the metadata.
+ this.fileList_.push.apply(this.fileList_, entriesFiltered);
+ cr.dispatchSimpleEvent(this, 'scan-updated');
+ }
callbackOuter();
}.bind(this);
// Because the prefetchMetadata can be slow, throttling by splitting entries