fix: honor user-defined Downloads directory (#29938)
This commit is contained in:
parent
372ecf32e6
commit
98809d8d64
1 changed files with 4 additions and 6 deletions
|
@ -1017,12 +1017,10 @@ ElectronBrowserClient::GetPlatformNotificationService(
|
||||||
}
|
}
|
||||||
|
|
||||||
base::FilePath ElectronBrowserClient::GetDefaultDownloadDirectory() {
|
base::FilePath ElectronBrowserClient::GetDefaultDownloadDirectory() {
|
||||||
// ~/Downloads
|
base::FilePath download_path;
|
||||||
base::FilePath path;
|
if (base::PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &download_path))
|
||||||
if (base::PathService::Get(base::DIR_HOME, &path))
|
return download_path;
|
||||||
path = path.Append(FILE_PATH_LITERAL("Downloads"));
|
return base::FilePath();
|
||||||
|
|
||||||
return path;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
scoped_refptr<network::SharedURLLoaderFactory>
|
scoped_refptr<network::SharedURLLoaderFactory>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue