mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWebView: Move stored settings to the system configuration directory
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This commit is contained in:
parent
a8285f255b
commit
8155377b5f
Notes:
github-actions[bot]
2025-03-24 21:56:36 +00:00
Author: https://github.com/trflynn89
Commit: 8155377b5f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4076
Reviewed-by: https://github.com/gmta ✅
1 changed files with 2 additions and 4 deletions
|
@ -25,9 +25,6 @@ static constexpr auto search_engine_name_key = "name"sv;
|
|||
|
||||
static ErrorOr<JsonObject> read_settings_file(StringView settings_path)
|
||||
{
|
||||
// FIXME: Move this to a generic "Ladybird data directory" helper.
|
||||
auto settings_directory = ByteString::formatted("{}/Ladybird", Core::StandardPaths::user_data_directory());
|
||||
|
||||
auto settings_file = Core::File::open(settings_path, Core::File::OpenMode::Read);
|
||||
if (settings_file.is_error()) {
|
||||
if (settings_file.error().is_errno() && settings_file.error().code() == ENOENT)
|
||||
|
@ -56,7 +53,8 @@ static ErrorOr<void> write_settings_file(StringView settings_path, StringView co
|
|||
|
||||
Settings Settings::create(Badge<Application>)
|
||||
{
|
||||
auto settings_directory = ByteString::formatted("{}/Ladybird", Core::StandardPaths::user_data_directory());
|
||||
// FIXME: Move this to a generic "Ladybird config directory" helper.
|
||||
auto settings_directory = ByteString::formatted("{}/Ladybird", Core::StandardPaths::config_directory());
|
||||
auto settings_path = ByteString::formatted("{}/Settings.json", settings_directory);
|
||||
|
||||
Settings settings { move(settings_path) };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue