Skip to content

Commit 189b00c

Browse files
committed
fix: remove duplication of gitbutler/gitbutler/settings.json
1 parent 4bc6d49 commit 189b00c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

crates/but-settings/src/persistence.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@ impl AppSettings {
1414
/// Finally, merge all customizations from `config_path` into the default settings.
1515
pub fn load(config_path: &Path) -> Result<Self> {
1616
// If the file on config_path does not exist, create it empty
17+
18+
dbg!(&config_path);
19+
1720
if !config_path.exists() {
1821
gitbutler_fs::create_dirs_then_write(config_path, "{}\n")?;
1922
}
2023

2124
// merge customizations from disk into the defaults to get a complete set of settings.
2225
let customizations = serde_json_lenient::from_str(&std::fs::read_to_string(config_path)?)?;
26+
dbg!(&customizations);
2327
let mut settings: serde_json::Value = serde_json_lenient::from_str(DEFAULTS)?;
2428

2529
merge_non_null_json_value(customizations, &mut settings);

crates/gitbutler-tauri/src/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ fn main() {
3737
let mut tauri_context = generate_context!();
3838
gitbutler_secret::secret::set_application_namespace(&tauri_context.config().identifier);
3939

40-
let config_dir = but_path::app_config_dir()
41-
.expect("missing config dir")
42-
.join("gitbutler");
40+
let config_dir = but_path::app_config_dir().expect("missing config dir");
4341
std::fs::create_dir_all(&config_dir).expect("failed to create config dir");
4442
let mut app_settings =
4543
AppSettingsWithDiskSync::new(config_dir.clone()).expect("failed to create app settings");

0 commit comments

Comments
 (0)