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 42653869d05ab561f9ddda424e4e0f277c5bedc2..f881e78e42a018f4737ba0416f3fa804bbbe426d 100644 |
--- a/chrome/browser/resources/file_manager/js/file_manager.js |
+++ b/chrome/browser/resources/file_manager/js/file_manager.js |
@@ -2010,11 +2010,16 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52; |
}; |
FileManager.prototype.isDriveEnabled = function() { |
- // TODO(kinaba): Remove the "!shouldReturnLocalPath &&" condition once |
- // crbug.com/140425 is done. |
- return !this.params_.shouldReturnLocalPath && |
- (!('driveEnabled' in this.preferences_) || |
- this.preferences_.driveEnabled); |
+ // Auto resolving to local path does not work for folders (e.g., dialog for |
+ // loading unpacked extensions) and saving. |
+ // TODO(kinaba): make it work for the save dialog http://crbug.com/140425 |
+ var noLocalPathResolution = |
+ this.params_.type == DialogType.SELECT_SAVEAS_FILE || |
+ this.params_.type == DialogType.SELECT_FOLDER || |
+ this.params_.type == DialogType.SELECT_UPLOAD_FOLDER; |
+ if (noLocalPathResolution && this.params_.shouldReturnLocalPath) |
+ return false; |
+ return this.preferences_.driveEnabled; |
}; |
FileManager.prototype.isOnReadonlyDirectory = function() { |