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

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

Issue 104643004: Fix broken task handling in Files app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up. Created 7 years 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 | « chrome/browser/resources/file_manager/foreground/js/file_manager.js ('k') | 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/foreground/js/file_tasks.js
diff --git a/chrome/browser/resources/file_manager/foreground/js/file_tasks.js b/chrome/browser/resources/file_manager/foreground/js/file_tasks.js
index 0cbee5b0a1b98c78d8ee56761a0c239784f97e56..adf28ae29d0e584835b6de4028d2f67e40c54282 100644
--- a/chrome/browser/resources/file_manager/foreground/js/file_tasks.js
+++ b/chrome/browser/resources/file_manager/foreground/js/file_tasks.js
@@ -559,18 +559,21 @@ FileTasks.prototype.mountArchivesInternal_ = function(entries) {
// TODO(mtomasz): Pass Entries instead of URLs.
var urls = util.entriesToURLs(entries);
- fm.resolveSelectResults_(urls, function(entries) {
- for (var index = 0; index < entries.length; ++index) {
+ fm.resolveSelectResults_(urls, function(resolvedURLs) {
+ for (var index = 0; index < resolvedURLs.length; ++index) {
// TODO(mtomasz): Pass Entry instead of URL.
- fm.volumeManager_.mountArchive(entries[index].toURL(),
+ fm.volumeManager_.mountArchive(resolvedURLs[index],
function(mountPath) {
tracker.stop();
if (!tracker.hasChanged)
fm.directoryModel_.changeDirectory(mountPath);
- }, function(entry, error) {
+ }, function(url, error) {
tracker.stop();
- fm.alert.show(strf('ARCHIVE_MOUNT_FAILED', entry.name, error));
- }.bind(null, entries[index]));
+ var path = util.extractFilePath(url);
+ var namePos = path.lastIndexOf('/');
+ fm.alert.show(strf('ARCHIVE_MOUNT_FAILED',
+ path.substr(namePos + 1), error));
+ }.bind(null, resolvedURLs[index]));
}
});
};
« no previous file with comments | « chrome/browser/resources/file_manager/foreground/js/file_manager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698