Index: ui/file_manager/file_manager/foreground/js/directory_model.js |
diff --git a/ui/file_manager/file_manager/foreground/js/directory_model.js b/ui/file_manager/file_manager/foreground/js/directory_model.js |
index ac27ae8b1dc7d35dbb18507d5a297fe464da72d9..c46055c0a921dc9c2a632f38d597482e215449ad 100644 |
--- a/ui/file_manager/file_manager/foreground/js/directory_model.js |
+++ b/ui/file_manager/file_manager/foreground/js/directory_model.js |
@@ -998,6 +998,16 @@ DirectoryModel.prototype.onVolumeInfoListUpdated_ = function(event) { |
this.changeDirectoryEntry(displayRoot); |
}.bind(this)); |
} |
+ |
+ // If a new provided volume is mounted, then redirect to it in the focused |
+ // window. Note, that this is a temporary solution for crbug.com/427776. |
+ if (window.isFocused() && |
+ event.added.length === 1 && |
+ event.added[0].volumeType == |
+ VolumeManagerCommon.VolumeType.VOLUME_TYPE_PROVIDED && |
+ event.added[0].displayRoot) { |
+ this.changeDirectoryEntry(event.added[0].displayRoot); |
+ } |
}; |
/** |