Commit e858542e authored by yoshiki@chromium.org's avatar yoshiki@chromium.org

Files.app: prevent unlimited recursive directory traversal

Previously, a directory traversal on the left directory tree is not limited because of a wrong condition. This patch fixes it.

BUG=none
TEST=manual
TBR=kinaba@chromium.org
NOTRY=True

Review URL: https://chromiumcodereview.appspot.com/12683006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190522 0039d316-1c4b-4281-b951-d872f2087c98
parent 26e1d78d
...@@ -164,7 +164,7 @@ DirectoryItem.prototype.decorate = function( ...@@ -164,7 +164,7 @@ DirectoryItem.prototype.decorate = function(
volumeManager.unmount(path, function() {}, function() {}); volumeManager.unmount(path, function() {}, function() {});
}.bind(this)); }.bind(this));
if ('expanded' in parentDirItem || parentDirItem.expanded) if (parentDirItem.expanded)
this.updateSubDirectories_(); this.updateSubDirectories_();
}; };
...@@ -268,6 +268,13 @@ DirectoryTree.decorate = function(el, directoryModel) { ...@@ -268,6 +268,13 @@ DirectoryTree.decorate = function(el, directoryModel) {
DirectoryTree.prototype = { DirectoryTree.prototype = {
__proto__: cr.ui.Tree.prototype, __proto__: cr.ui.Tree.prototype,
// DirectoryTree is always expanded.
get expanded() { return true; },
/**
* @param {boolean} value Not used.
*/
set expanded(value) {}
}; };
/** /**
......
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