Commit 1b1943b7 authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

FilesApp: guard getLocationInfo call

I saw some flakiness today in the QuickView UI test where a volume can
be unmounted whilst a rescan is in progress.  Then when it is finally
complete, this call to getLocationInfo fails.

Change-Id: Ie29e551b980b3e4bacea7b6bd39746c8c140e1aa
Reviewed-on: https://chromium-review.googlesource.com/c/1337136Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608277}
parent c51b6c6a
......@@ -699,7 +699,7 @@ DirectoryModel.prototype.scan_ = function(
var locationInfo =
this.volumeManager_.getLocationInfo(
assert(dirContents.getDirectoryEntry()));
var volumeInfo = locationInfo.volumeInfo;
var volumeInfo = locationInfo && locationInfo.volumeInfo;
if (volumeInfo &&
volumeInfo.volumeType === VolumeManagerCommon.VolumeType.DOWNLOADS &&
locationInfo.isRootEntry) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment