fix: dictionaries download path should be in userdata (#22444)
This commit is contained in:
parent
2c974915a3
commit
ced487467c
2 changed files with 6 additions and 0 deletions
|
@ -880,6 +880,9 @@ void App::SetPath(gin_helper::ErrorThrower thrower,
|
||||||
if (key == DIR_USER_DATA) {
|
if (key == DIR_USER_DATA) {
|
||||||
succeed |= base::PathService::OverrideAndCreateIfNeeded(
|
succeed |= base::PathService::OverrideAndCreateIfNeeded(
|
||||||
chrome::DIR_USER_DATA, path, true, false);
|
chrome::DIR_USER_DATA, path, true, false);
|
||||||
|
succeed |= base::PathService::Override(
|
||||||
|
chrome::DIR_APP_DICTIONARIES,
|
||||||
|
path.Append(base::FilePath::FromUTF8Unsafe("Dictionaries")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!succeed)
|
if (!succeed)
|
||||||
|
|
|
@ -119,6 +119,9 @@ ElectronBrowserContext::ElectronBrowserContext(const std::string& partition,
|
||||||
path_ = path_.Append(base::FilePath::FromUTF8Unsafe(GetApplicationName()));
|
path_ = path_.Append(base::FilePath::FromUTF8Unsafe(GetApplicationName()));
|
||||||
base::PathService::Override(DIR_USER_DATA, path_);
|
base::PathService::Override(DIR_USER_DATA, path_);
|
||||||
base::PathService::Override(chrome::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())
|
if (!in_memory && !partition.empty())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue