| Index: chrome/browser/extensions/api/file_system/file_system_api.cc
|
| diff --git a/chrome/browser/extensions/api/file_system/file_system_api.cc b/chrome/browser/extensions/api/file_system/file_system_api.cc
|
| index dbe8bfdc83aa506e9c2dc6cabb020662319e8094..6c3dc8754c28ee81fed5cd59c482851889152dd6 100644
|
| --- a/chrome/browser/extensions/api/file_system/file_system_api.cc
|
| +++ b/chrome/browser/extensions/api/file_system/file_system_api.cc
|
| @@ -639,13 +639,10 @@ void FileSystemChooseEntryFunction::FilesSelected(
|
| content::WebContents* web_contents = app_window->web_contents();
|
|
|
| DCHECK_EQ(paths.size(), 1u);
|
| + bool non_native_path = false;
|
| #if defined(OS_CHROMEOS)
|
| - base::FilePath check_path =
|
| - file_manager::util::IsUnderNonNativeLocalPath(GetProfile(), paths[0])
|
| - ? paths[0]
|
| - : base::MakeAbsoluteFilePath(paths[0]);
|
| -#else
|
| - base::FilePath check_path = base::MakeAbsoluteFilePath(paths[0]);
|
| + non_native_path =
|
| + file_manager::util::IsUnderNonNativeLocalPath(GetProfile(), paths[0]);
|
| #endif
|
|
|
| content::BrowserThread::PostTask(
|
| @@ -654,7 +651,7 @@ void FileSystemChooseEntryFunction::FilesSelected(
|
| base::Bind(
|
| &FileSystemChooseEntryFunction::ConfirmDirectoryAccessOnFileThread,
|
| this,
|
| - check_path,
|
| + non_native_path,
|
| paths,
|
| web_contents));
|
| return;
|
| @@ -669,9 +666,11 @@ void FileSystemChooseEntryFunction::FileSelectionCanceled() {
|
| }
|
|
|
| void FileSystemChooseEntryFunction::ConfirmDirectoryAccessOnFileThread(
|
| - const base::FilePath& check_path,
|
| + bool non_native_path,
|
| const std::vector<base::FilePath>& paths,
|
| content::WebContents* web_contents) {
|
| + const base::FilePath check_path =
|
| + non_native_path ? paths[0] : base::MakeAbsoluteFilePath(paths[0]);
|
| if (check_path.empty()) {
|
| content::BrowserThread::PostTask(
|
| content::BrowserThread::UI,
|
|
|