Fix attaching files from shared with me on Drive.
commit53973860013e1f085b3eab6995afc542e77ee585
authormtomasz <mtomasz@chromium.org>
Wed, 8 Oct 2014 12:29:15 +0000 (8 05:29 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 8 Oct 2014 12:29:50 +0000 (8 12:29 +0000)
tree66af2899ab25931945bc9add7a6d4510522d9454
parent1db67dba77a0342c11c22fbe7e30f276e19fd421
Fix attaching files from shared with me on Drive.

If a user attaches a file from shared with me, then all consecutive tries to
attach will invoke Files app in a wrong state. Changing directories will be
impossible.

Shared files are under /other pseudo directory. However, in Files app we don't
support opening this directory. Instead we do a custom search on a fake entry.

If a file from shared with me is selected, then the location is remembered (at
/other), and the Files app tries to open /other when a select dialog is opened.

This patch resolves this issue by checking if the initial directory is /other.
If so, then opens the Drive main directory instead.

TEST=Tested manually with several scenarios.
BUG=416482

Review URL: https://codereview.chromium.org/637853002

Cr-Commit-Position: refs/heads/master@{#298686}
ui/file_manager/file_manager/foreground/js/file_manager.js