Index: chrome/browser/resources/file_manager/js/volume_list.js |
diff --git a/chrome/browser/resources/file_manager/js/volume_list.js b/chrome/browser/resources/file_manager/js/volume_list.js |
index e27301c40cd03e2753c286c7b83605a754dd77d1..f2cbc88aa4f6c6500ba6a703caa81aa6d7c41f14 100644 |
--- a/chrome/browser/resources/file_manager/js/volume_list.js |
+++ b/chrome/browser/resources/file_manager/js/volume_list.js |
@@ -186,8 +186,6 @@ VolumeList.prototype.decorate = function(directoryModel, pinnedFolderModel) { |
'change', this.onSelectionChange_.bind(this)); |
this.selectionModel.addEventListener( |
'beforeChange', this.onBeforeSelectionChange_.bind(this)); |
- this.currentVolume_ = null; |
- |
this.scrollBar_ = new ScrollBar(); |
this.scrollBar_.initialize(this.parentNode, this); |
@@ -314,11 +312,10 @@ VolumeList.prototype.selectByIndex = function(index) { |
return false; |
var newPath = this.dataModel.item(index); |
- if (!newPath || this.currentVolume_ == newPath) |
+ if (!newPath || this.directoryModel.getCurrentDirEntry().fullPath == newPath) |
mtomasz
2013/08/05 12:17:57
directoryModel -> directoryModel_
mtomasz
2013/08/05 12:17:57
I think this will not work as it should. getCurren
yoshiki
2013/08/05 16:08:01
Done.
yoshiki
2013/08/05 16:08:01
It should work. Previous code was wrong.
Before i
mtomasz
2013/08/05 16:25:52
I see. My concern is that this check was used to a
|
return false; |
- this.currentVolume_ = newPath; |
- this.directoryModel_.changeDirectory(this.currentVolume_); |
+ this.directoryModel_.changeDirectory(newPath); |
return true; |
}; |
@@ -355,10 +352,6 @@ VolumeList.prototype.onCurrentDirectoryChanged_ = function(event) { |
var path = event.newDirEntry.fullPath || this.dataModel.getCurrentDirPath(); |
var newRootPath = PathUtil.getRootPath(path); |
- // Sets |this.currentVolume_| in advance to prevent |onSelectionChange_()| |
- // from calling |DirectoryModel.ChangeDirectory()| again. |
- this.currentVolume_ = newRootPath; |
- |
// Synchronizes the volume list selection with the current directory, after |
// it is changed outside of the volume list. |