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

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

Issue 8414006: Make FileManagerDialog::SelectFileImpl() properly accept simple filenames as default path. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 2 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 | chrome/browser/ui/views/file_manager_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2bf85d9c1e1e43bd264f49d4d3e13914fb47b39a..5810249270651165563a40e9fb1e2a5d58543e73 100644
--- a/chrome/browser/resources/file_manager/js/file_manager.js
+++ b/chrome/browser/resources/file_manager/js/file_manager.js
@@ -1274,7 +1274,7 @@ FileManager.prototype = {
FileManager.prototype.setupPath_ = function(path) {
// Split the dirname from the basename.
- var ary = path.match(/^(.*?)(?:\/([^\/]+))?$/);
+ var ary = path.match(/^(?:(.*)\/)?([^\/]*)$/);
if (!ary) {
console.warn('Unable to split default path: ' + path);
self.changeDirectory('/', CD_NO_HISTORY);
« no previous file with comments | « no previous file | chrome/browser/ui/views/file_manager_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698