Skip to content

Commit 6c391f5

Browse files
committed
Update logic for db upgrade file deletion.
1 parent 8abecad commit 6c391f5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

crates/core/src/paths.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ impl Paths {
330330
/// account-level preferences.
331331
pub fn preferences_file(&self) -> PathBuf {
332332
let mut path = if self.is_global() {
333-
self.global_preferences_file()
333+
self.documents_dir().join(PREFERENCES_FILE)
334334
} else {
335335
self.user_dir().join(PREFERENCES_FILE)
336336
};
@@ -340,7 +340,9 @@ impl Paths {
340340

341341
/// Path to the global preferences file.
342342
pub fn global_preferences_file(&self) -> PathBuf {
343-
self.documents_dir().join(PREFERENCES_FILE)
343+
let mut path = self.documents_dir().join(PREFERENCES_FILE);
344+
path.set_extension(JSON_EXT);
345+
path
344346
}
345347

346348
/// Path to the file used to store account-level system messages.

crates/database_upgrader/src/upgrader/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ async fn delete_stale_files(
436436
options.paths.identity_dir().to_owned(),
437437
options.paths.audit_file().to_owned(),
438438
options.paths.global_preferences_file(),
439+
options.paths.local_dir().join(".DS_Store"),
439440
];
440441

441442
for account in accounts {

0 commit comments

Comments
 (0)