-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
…irectory
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ CustomSettings::CustomSettings(Deployer* deployer, | |
bool CustomSettings::Load() { | ||
fs::path user_data_path(deployer_->user_data_dir); | ||
fs::path shared_data_path(deployer_->shared_data_dir); | ||
fs::path config_path(user_data_path / (config_id_ + ".yaml")); | ||
fs::path config_path(user_data_path / "build" / (config_id_ + ".yaml")); | ||
if (!config_.LoadFromFile(config_path.string())) { | ||
config_path = shared_data_path / (config_id_ + ".yaml"); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Prcuvu
Author
Contributor
|
||
if (!config_.LoadFromFile(config_path.string())) { | ||
|
Thank you for fixing this.
I will make an additional change, once verified:
The fallback path for
config
(asConfigComponent<ConfigLoader>
) should be changed to$shared_data_path/build/
.This is because
Config::LoadFromFile()
only loads contents of the YAML file without using aConfigCompiler
, which is part ofConfigComponent<ConfigBuilder>
. In order to load complete config data, the file has to be a built copy rather than a source file which may have external references.This commit should fix everything for Weasel, in which the shared data is not prebuilt and the installer deploys user data instead. But in macOS and Linux the installer runs as root and has to deploy in shared data directory.
config_builder
will create built copies in$shared_data_dir/build/
which may be the copy used at run-time if user doesn't customize it; I anticipate in this case the user copy is not generated at all.