Fix restoring after a crash.
When opened selected a USB volume in Files app, and crashed, the Files app is tried to be restored with the previous path. However, the volume may not yet be available. In such case, parent is considered. However, parent is /removable, which resolving causes an error, resulting in throwing an exception and going into a wrong state. In such situation, we should fallback, and this is what this patch does. If the parent is not resolvable, then the fallback is used as the next current directory instead. Moreover, after recent refactoring a regression has been introduced. When resolving a parent of the initial directory fails, then a wrong variable name was used, what caused a JS error. TEST=Tested manually on Pixel. BUG=331587 Review URL: https://codereview.chromium.org/124933002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243538 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment