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

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

Issue 7711025: [filebrowser] Fix detection of unmount-archive action. (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
« 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_manager.js
===================================================================
--- chrome/browser/resources/file_manager/js/file_manager.js (revision 97846)
+++ chrome/browser/resources/file_manager/js/file_manager.js (working copy)
@@ -1679,9 +1679,19 @@
FileManager.prototype.maybeRenderUnmountTask_ = function(selection) {
for (var index = 0; index < selection.urls.length; ++index) {
// Each url should be a mount point.
- var path = selection.urls[index];
- if (!this.mountPoints_.hasOwnProperty(path) ||
- this.mountPoints_[path].type != 'file')
+ var path = selection.entries[index].fullPath;
+ var found = false;
+ for (var i = 0; i < this.mountPoints_.length; i++) {
+ var mountPath = this.mountPoints_[i].mountPath;
+ if (mountPath[0] != '/') {
rginda 2011/08/23 21:09:03 FYI, in http://codereview.chromium.org/7706028/ Sz
+ mountPath = '/' + mountPath;
+ }
+ if (mountPath == path && this.mountPoints_[i].mountType == 'file') {
+ found = true;
+ break;
+ }
+ }
+ if (!found)
return;
}
this.renderTaskButton_({
« 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