| Index: chrome/browser/resources/file_manager/js/file_manager.js
|
| ===================================================================
|
| --- chrome/browser/resources/file_manager/js/file_manager.js (revision 95171)
|
| +++ chrome/browser/resources/file_manager/js/file_manager.js (working copy)
|
| @@ -1601,9 +1601,18 @@
|
| }
|
| }
|
| }
|
| +
|
| + if (event.eventType == 'unmount' && event.status == 'success' &&
|
| + self.currentDirEntry_ &&
|
| + isParentPath(event.mountPath, self.currentDirEntry_.fullPath)) {
|
| + self.changeDirectory(getParentPath(event.mountPath));
|
| + return;
|
| + }
|
| +
|
| // TODO(dgozman): rescan directory, only if it contains mounted points,
|
| // when mounts location will be decided.
|
| - this.rescanDirectory_();
|
| + if (event.status == 'success')
|
| + self.rescanDirectory_();
|
| });
|
| };
|
|
|
| @@ -2258,15 +2267,6 @@
|
| * @param {string} path The path that has been mounted or unmounted.
|
| */
|
| FileManager.prototype.onDiskChanged_ = function(event) {
|
| - if (event.eventType == 'added') {
|
| - this.changeDirectory(event.volumeInfo.mountPath);
|
| - } else if (event.eventType == 'removed') {
|
| - if (this.currentDirEntry_ &&
|
| - isParentPath(event.volumeInfo.mountPath,
|
| - this.currentDirEntry_.fullPath)) {
|
| - this.changeDirectory(getParentPath(event.volumeInfo.mountPath));
|
| - }
|
| - }
|
| };
|
|
|
| /**
|
|
|