From 41c5dc04c18890414f84465478e3b06697d24936 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 29 Jun 2021 14:04:46 +0200 Subject: [PATCH] fix: honor user-defined Downloads directory --- shell/browser/electron_browser_client.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 369dad3f26090..9ded4cd634328 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -1232,12 +1232,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