| Index: chrome/browser/resources/file_manager/foreground/js/file_manager.js
|
| diff --git a/chrome/browser/resources/file_manager/foreground/js/file_manager.js b/chrome/browser/resources/file_manager/foreground/js/file_manager.js
|
| index c4523d28f3aca887f25142666bf7fd920e48b29f..e39955e48ae4e87eeb5b68642fc5ffc9f7cbb46a 100644
|
| --- a/chrome/browser/resources/file_manager/foreground/js/file_manager.js
|
| +++ b/chrome/browser/resources/file_manager/foreground/js/file_manager.js
|
| @@ -2283,6 +2283,21 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
|
| * @private
|
| */
|
| FileManager.prototype.onDirectoryChanged_ = function(event) {
|
| + var newCurrentVolumeInfo = this.volumeManager_.getVolumeInfo(
|
| + event.newDirEntry);
|
| +
|
| + // If volume has changed, then update the gear menu.
|
| + if (this.currentVolumeInfo_ !== newCurrentVolumeInfo) {
|
| + this.updateGearMenu_();
|
| + // If the volume has changed, and it was previously set, then do not
|
| + // close on unmount anymore.
|
| + if (this.currentVolumeInfo_)
|
| + this.closeOnUnmount_ = false;
|
| + }
|
| +
|
| + // Remember the current volume info.
|
| + this.currentVolumeInfo_ = newCurrentVolumeInfo;
|
| +
|
| this.selectionHandler_.onFileSelectionChanged();
|
| this.ui_.searchBox.clear();
|
| // TODO(mtomasz): Use Entry.toURL() instead of fullPath.
|
| @@ -2298,24 +2313,10 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
|
|
|
| this.updateUnformattedVolumeStatus_();
|
| this.updateTitle_();
|
| - var newCurrentVolumeInfo = this.volumeManager_.getVolumeInfo(
|
| - event.newDirEntry);
|
| -
|
| - // If volume has changed, then update the gear menu.
|
| - if (this.currentVolumeInfo_ !== newCurrentVolumeInfo) {
|
| - this.updateGearMenu_();
|
| - // If the volume has changed, and it was previously set, then do not
|
| - // close on unmount anymore.
|
| - if (this.currentVolumeInfo_)
|
| - this.closeOnUnmount_ = false;
|
| - }
|
|
|
| var currentEntry = this.getCurrentDirectoryEntry();
|
| this.previewPanel_.currentEntry = util.isFakeEntry(currentEntry) ?
|
| null : currentEntry;
|
| -
|
| - // Remember the current volume info.
|
| - this.currentVolumeInfo_ = newCurrentVolumeInfo;
|
| };
|
|
|
| FileManager.prototype.updateUnformattedVolumeStatus_ = function() {
|
|
|