diff options
author | serya@chromium.org <serya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-02 21:30:01 +0000 |
---|---|---|
committer | serya@chromium.org <serya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-02 21:30:01 +0000 |
commit | a939356ce6f0ec9e30a2380b8d55bb3c3eafb760 (patch) | |
tree | b123f0188aa913d9dd84526cb0b137d055f47206 | |
parent | e934a23e65d929c19a7fbfb3bdf1f08a52e84cd2 (diff) | |
download | chromium_src-a939356ce6f0ec9e30a2380b8d55bb3c3eafb760.zip chromium_src-a939356ce6f0ec9e30a2380b8d55bb3c3eafb760.tar.gz chromium_src-a939356ce6f0ec9e30a2380b8d55bb3c3eafb760.tar.bz2 |
Fixed bunch of bugs on special directories operations in the File Manager.
BUG=chromium-os:17782,chromium-os:18432,chromium-os:17778,chromium-os:17454
TEST=None
Review URL: http://codereview.chromium.org/7555001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95160 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/resources/file_manager/js/file_manager.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js index 79928aa..a07cf108 100644 --- a/chrome/browser/resources/file_manager/js/file_manager.js +++ b/chrome/browser/resources/file_manager/js/file_manager.js @@ -170,13 +170,13 @@ FileManager.prototype = { * The DirectoryEntry.fullPath value of the directory containing externally * mounted removable storage volumes. */ - const REMOVABLE_DIRECTORY = 'removable'; + const REMOVABLE_DIRECTORY = '/removable'; /** * The DirectoryEntry.fullPath value of the directory containing externally * mounted archive file volumes. */ - const ARCHIVE_DIRECTORY = 'archive'; + const ARCHIVE_DIRECTORY = '/archive'; /** * Mnemonics for the second parameter of the changeDirectory method. @@ -2389,7 +2389,8 @@ FileManager.prototype = { */ FileManager.prototype.allowRenameClick_ = function(event, row) { if (this.dialogType_ != FileManager.DialogType.FULL_PAGE || - this.currentDirEntry_.name == '') { + this.currentDirEntry_.name == '' || + isSystemDirEntry(this.currentDirEntry_)) { // Renaming only enabled for full-page mode, outside of the root // directory. return false; @@ -2701,7 +2702,8 @@ FileManager.prototype = { case 46: // Delete. if (this.dialogType_ == FileManager.DialogType.FULL_PAGE && - this.selection.totalCount > 0) { + this.selection.totalCount > 0 && + !isSystemDirEntry(this.currentDirEntry_)) { event.preventDefault(); this.deleteEntries(this.selection.entries); } |