mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: dictionaries download path should be in userdata (#22448)
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
This commit is contained in:
@@ -882,6 +882,9 @@ void App::SetPath(gin_helper::ErrorThrower thrower,
|
||||
if (key == DIR_USER_DATA) {
|
||||
succeed |= base::PathService::OverrideAndCreateIfNeeded(
|
||||
chrome::DIR_USER_DATA, path, true, false);
|
||||
succeed |= base::PathService::Override(
|
||||
chrome::DIR_APP_DICTIONARIES,
|
||||
path.Append(base::FilePath::FromUTF8Unsafe("Dictionaries")));
|
||||
}
|
||||
}
|
||||
if (!succeed)
|
||||
|
||||
@@ -118,6 +118,9 @@ ElectronBrowserContext::ElectronBrowserContext(
|
||||
path_ = path_.Append(base::FilePath::FromUTF8Unsafe(GetApplicationName()));
|
||||
base::PathService::Override(DIR_USER_DATA, path_);
|
||||
base::PathService::Override(chrome::DIR_USER_DATA, path_);
|
||||
base::PathService::Override(
|
||||
chrome::DIR_APP_DICTIONARIES,
|
||||
path_.Append(base::FilePath::FromUTF8Unsafe("Dictionaries")));
|
||||
}
|
||||
|
||||
if (!in_memory && !partition.empty())
|
||||
|
||||
Reference in New Issue
Block a user