mirror of https://github.com/logseq/logseq
enhance: backup db file when not matched
parent
781062a4ce
commit
b025ce71d2
|
@ -69,6 +69,8 @@
|
|||
(->
|
||||
(p/let [result (ipc/ipc "writeFile" repo path content)
|
||||
mtime (gobj/get result "mtime")]
|
||||
(when-not contents-matched?
|
||||
(ipc/ipc "backupDbFile" (config/get-local-dir repo) path db-content content))
|
||||
(db/set-file-last-modified-at! repo path mtime)
|
||||
(p/let [content (if (encrypt/encrypted-db? (state/get-current-repo))
|
||||
(encrypt/decrypt content)
|
||||
|
|
Loading…
Reference in New Issue