Skip to content

Commit

Permalink
fix: honor user-defined Downloads directory (#29938)
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Jun 30, 2021
1 parent 372ecf3 commit 98809d8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions shell/browser/electron_browser_client.cc
Expand Up @@ -1017,12 +1017,10 @@ ElectronBrowserClient::GetPlatformNotificationService(
}

base::FilePath ElectronBrowserClient::GetDefaultDownloadDirectory() {
// ~/Downloads
base::FilePath path;
if (base::PathService::Get(base::DIR_HOME, &path))
path = path.Append(FILE_PATH_LITERAL("Downloads"));

return path;
base::FilePath download_path;
if (base::PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &download_path))
return download_path;
return base::FilePath();
}

scoped_refptr<network::SharedURLLoaderFactory>
Expand Down

0 comments on commit 98809d8

Please sign in to comment.