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 28749bc92f0daf6d1ed212ee2eb7be1aa701620d..fa4c18bb69fa4ef684dbd15ab16fef027dd379c0 100644 |
--- a/chrome/browser/resources/file_manager/js/file_manager.js |
+++ b/chrome/browser/resources/file_manager/js/file_manager.js |
@@ -19,9 +19,6 @@ function FileManager(dialogDom) { |
this.params_ = location.search ? |
JSON.parse(decodeURIComponent(location.search.substr(1))) : |
{}; |
- if (this.params_.defaultPath && this.params_.defaultPath.indexOf('/') != 0) |
- this.params_.defaultPath = '/' + this.params_.defaultPath; |
- |
this.listType_ = null; |
this.showDelayTimeout_ = null; |
@@ -1507,8 +1504,10 @@ FileManager.prototype = { |
return; |
if (!path) { |
- this.directoryModel_.setupDefaultPath(); |
- return; |
+ path = this.directoryModel_.getDefaultDirectory(); |
+ } else if (path.indexOf('/') == -1) { |
+ // Path is a file name. |
+ path = this.directoryModel_.getDefaultDirectory() + '/' + path; |
} |
// In the FULL_PAGE mode if the hash path points to a file we might have |