File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,16 @@ impl AppSettings {
14
14
/// Finally, merge all customizations from `config_path` into the default settings.
15
15
pub fn load ( config_path : & Path ) -> Result < Self > {
16
16
// If the file on config_path does not exist, create it empty
17
+
18
+ dbg ! ( & config_path) ;
19
+
17
20
if !config_path. exists ( ) {
18
21
gitbutler_fs:: create_dirs_then_write ( config_path, "{}\n " ) ?;
19
22
}
20
23
21
24
// merge customizations from disk into the defaults to get a complete set of settings.
22
25
let customizations = serde_json_lenient:: from_str ( & std:: fs:: read_to_string ( config_path) ?) ?;
26
+ dbg ! ( & customizations) ;
23
27
let mut settings: serde_json:: Value = serde_json_lenient:: from_str ( DEFAULTS ) ?;
24
28
25
29
merge_non_null_json_value ( customizations, & mut settings) ;
Original file line number Diff line number Diff line change @@ -37,9 +37,7 @@ fn main() {
37
37
let mut tauri_context = generate_context ! ( ) ;
38
38
gitbutler_secret:: secret:: set_application_namespace ( & tauri_context. config ( ) . identifier ) ;
39
39
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" ) ;
43
41
std:: fs:: create_dir_all ( & config_dir) . expect ( "failed to create config dir" ) ;
44
42
let mut app_settings =
45
43
AppSettingsWithDiskSync :: new ( config_dir. clone ( ) ) . expect ( "failed to create app settings" ) ;
You can’t perform that action at this time.
0 commit comments