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

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

Issue 1086353002: Cancel on-going scan when change directory is requested. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months 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/directory_model.js
diff --git a/ui/file_manager/file_manager/foreground/js/directory_model.js b/ui/file_manager/file_manager/foreground/js/directory_model.js
index 390ff3c6a0a30f626e05d05ccd0eac7322d12154..5b34d882ac82142018e9f86f43112f76351e1914 100644
--- a/ui/file_manager/file_manager/foreground/js/directory_model.js
+++ b/ui/file_manager/file_manager/foreground/js/directory_model.js
@@ -924,6 +924,10 @@ DirectoryModel.prototype.changeDirectoryEntry = function(
this.changeDirectorySequence_++;
this.clearSearch_();
+ // If there is on-going scan, cancel it.
+ if (this.currentDirContents_.isScanning())
+ this.currentDirContents_.cancelScan();
+
this.directoryChangeQueue_.run(function(sequence, queueTaskCallback) {
this.fileWatcher_.changeWatchedDirectory(
dirEntry,
« 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