Save global config edits

Also alert user if write fails
This commit is contained in:
Gabriel Horner
2022-09-01 11:45:41 -04:00
committed by Andelf
parent 9c0bb02dcd
commit 095a4ef1cd
5 changed files with 51 additions and 20 deletions

View File

@@ -338,13 +338,9 @@
(when nfs?
(swap! path-handles assoc path handle))))
global-dir (config/get-global-config-dir)
global-dir-exists? (fs/dir-exists? global-dir)
;; TODO: Handle nfs?
global-files-result (if global-dir-exists?
(fs/get-files global-dir
(fn [path handle]
(when nfs?
(swap! path-handles assoc path handle))))
global-config-supported? (and electron? (fs/dir-exists? global-dir))
global-files-result (if global-config-supported?
(fs/get-files global-dir (constantly nil))
[])
new-local-files (-> (->db-files mobile-native? electron? dir-name local-files-result)
(remove-ignore-files dir-name nfs?))