mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: honor user-defined Downloads directory (#29938)
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user