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

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

Issue 23599004: Obtain downloads dir entry from VolumeManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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: chrome/browser/resources/file_manager/js/file_tasks.js
diff --git a/chrome/browser/resources/file_manager/js/file_tasks.js b/chrome/browser/resources/file_manager/js/file_tasks.js
index 1b37dabbffa47ce038a7f94653181dba4a1a346e..b2823933d7b20944122c088a2c0fc0324b9d2c79 100644
--- a/chrome/browser/resources/file_manager/js/file_tasks.js
+++ b/chrome/browser/resources/file_manager/js/file_tasks.js
@@ -556,7 +556,9 @@ FileTasks.prototype.openGalleryInternal_ = function(urls) {
// is writable or not.
var readonly = fm.isOnReadonlyDirectory();
var currentDir = fm.directoryModel_.getCurrentDirEntry();
- var downloadsDir = fm.directoryModel_.getRootsList().item(0);
+ var downloadsVolume =
+ fm.volumeManager_.getVolumeInfo(RootDirectory.DOWNLOADS);
+ var downloadsDir = downloadsVolume && downloadsVolume.root;
var readonlyDirName = null;
if (readonly) {
readonlyDirName = fm.isOnDrive() ?
« 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