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

Unified Diff: chrome/browser/resources/file_manager/js/file_manager.js

Issue 10804026: Fix open dialog not remembering last opened folder on drive (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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
Index: chrome/browser/resources/file_manager/js/file_manager.js
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
index fd9b0c0cb59f5e3d08fa7af1f17f6b5a3b4fe8b8..fa4fbcbb8915a941a97349f9dbbfdbfb7da6231f 100644
--- a/chrome/browser/resources/file_manager/js/file_manager.js
+++ b/chrome/browser/resources/file_manager/js/file_manager.js
@@ -2922,15 +2922,18 @@ FileManager.prototype = {
if (this.dialogType_ == FileManager.DialogType.SELECT_FOLDER) {
// In SELECT_FOLDER mode, we allow to select current directory
// when nothing is selected.
- selectable = this.selection.directoryCount <= 1 &&
- this.selection.fileCount == 0;
+ selectable = this.selection &&
+ this.selection.directoryCount <= 1 &&
+ this.selection.fileCount == 0;
} else if (this.dialogType_ == FileManager.DialogType.SELECT_OPEN_FILE) {
- selectable = (this.isSelectionAvailable() &&
+ selectable = (this.selection &&
+ this.isSelectionAvailable() &&
this.selection.directoryCount == 0 &&
this.selection.fileCount == 1);
} else if (this.dialogType_ ==
FileManager.DialogType.SELECT_OPEN_MULTI_FILE) {
- selectable = (this.isSelectionAvailable() &&
+ selectable = (this.selection &&
+ this.isSelectionAvailable() &&
this.selection.directoryCount == 0 &&
this.selection.fileCount >= 1);
} else if (this.dialogType_ == FileManager.DialogType.SELECT_SAVEAS_FILE) {

Powered by Google App Engine
This is Rietveld 408576698