fix: use correct userData path when unbundled (#30113)
This commit is contained in:
parent
4db7221c7d
commit
bec47f54f4
7 changed files with 32 additions and 36 deletions
|
@ -118,11 +118,7 @@ ElectronBrowserContext::ElectronBrowserContext(const std::string& partition,
|
|||
base::StringToInt(command_line->GetSwitchValueASCII(switches::kDiskCacheSize),
|
||||
&max_cache_size_);
|
||||
|
||||
if (!base::PathService::Get(chrome::DIR_USER_DATA, &path_)) {
|
||||
base::PathService::Get(DIR_APP_DATA, &path_);
|
||||
path_ = path_.Append(base::FilePath::FromUTF8Unsafe(GetApplicationName()));
|
||||
base::PathService::Override(chrome::DIR_USER_DATA, path_);
|
||||
}
|
||||
CHECK(base::PathService::Get(chrome::DIR_USER_DATA, &path_));
|
||||
|
||||
if (!in_memory && !partition.empty())
|
||||
path_ = path_.Append(FILE_PATH_LITERAL("Partitions"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue