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

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

Issue 7764011: File Manager: Assorted fixes and polish (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
Index: chrome/browser/resources/file_manager/js/util.js
diff --git a/chrome/browser/resources/file_manager/js/util.js b/chrome/browser/resources/file_manager/js/util.js
index 2217aab6503eb0c8b1bf86efc213ee1f1b951c67..5eeaa630e746ad555a15b248f45c9b7f3f4e232e 100644
--- a/chrome/browser/resources/file_manager/js/util.js
+++ b/chrome/browser/resources/file_manager/js/util.js
@@ -254,7 +254,7 @@ var util = {
* Locate the file referred to by path, creating directories or the file
* itself if necessary.
*/
- getOrCreateFile: function(path, successCallback, errorCallback) {
+ getOrCreateFile: function(root, path, successCallback, errorCallback) {
var dirname = null;
var basename = null;
@@ -272,16 +272,16 @@ var util = {
}
if (!dirname)
- return onDirFound(this.filesystem.root);
+ return onDirFound(root);
- this.getOrCreateDirectory(dirname, onDirFound, errorCallback);
+ util.getOrCreateDirectory(root, dirname, onDirFound, errorCallback);
},
/**
* Locate the directory referred to by path, creating directories along the
* way.
*/
- getOrCreateDirectory: function(path, successCallback, errorCallback) {
+ getOrCreateDirectory: function(root, path, successCallback, errorCallback) {
var names = path.split('/');
function getOrCreateNextName(dir) {
@@ -297,7 +297,7 @@ var util = {
errorCallback);
}
- getOrCreateNextName(this.filesystem.root);
+ getOrCreateNextName(root);
},
/**

Powered by Google App Engine
This is Rietveld 408576698