Commit 214dbea3 authored by dgozman@chromium.org's avatar dgozman@chromium.org

[filebrowser] Fix detection of unmount-archive action.

BUG=chromium-os:19510
TEST=See bug.
Review URL: http://codereview.chromium.org/7711025

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98412 0039d316-1c4b-4281-b951-d872f2087c98
parent 2cead601
...@@ -1682,9 +1682,19 @@ FileManager.prototype = { ...@@ -1682,9 +1682,19 @@ FileManager.prototype = {
FileManager.prototype.maybeRenderUnmountTask_ = function(selection) { FileManager.prototype.maybeRenderUnmountTask_ = function(selection) {
for (var index = 0; index < selection.urls.length; ++index) { for (var index = 0; index < selection.urls.length; ++index) {
// Each url should be a mount point. // Each url should be a mount point.
var path = selection.urls[index]; var path = selection.entries[index].fullPath;
if (!this.mountPoints_.hasOwnProperty(path) || var found = false;
this.mountPoints_[path].type != 'file') for (var i = 0; i < this.mountPoints_.length; i++) {
var mountPath = this.mountPoints_[i].mountPath;
if (mountPath[0] != '/') {
mountPath = '/' + mountPath;
}
if (mountPath == path && this.mountPoints_[i].mountType == 'file') {
found = true;
break;
}
}
if (!found)
return; return;
} }
this.renderTaskButton_({ this.renderTaskButton_({
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment