mirror of
https://github.com/org-roam/org-roam
synced 2025-08-03 12:27:23 -05:00
Force sync: close the database before removal (#1738)
A force resync of the database does not work in Windows (Cygwin): apply: Removing old name: Device or resource busy, /home/brschoen/.emacs.d/org-roam.db Therefore, close the connection first and then try to remove the database file.
This commit is contained in:
committed by
GitHub
parent
1d03f87cd1
commit
56e66f92d2
@ -479,8 +479,8 @@ If UPDATE-P is non-nil, first remove the file in the database."
|
|||||||
"Synchronize the cache state with the current Org files on-disk.
|
"Synchronize the cache state with the current Org files on-disk.
|
||||||
If FORCE, force a rebuild of the cache from scratch."
|
If FORCE, force a rebuild of the cache from scratch."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(when force (delete-file org-roam-db-location))
|
|
||||||
(org-roam-db--close) ;; Force a reconnect
|
(org-roam-db--close) ;; Force a reconnect
|
||||||
|
(when force (delete-file org-roam-db-location))
|
||||||
(org-roam-db) ;; To initialize the database, no-op if already initialized
|
(org-roam-db) ;; To initialize the database, no-op if already initialized
|
||||||
(let* ((gc-cons-threshold org-roam-db-gc-threshold)
|
(let* ((gc-cons-threshold org-roam-db-gc-threshold)
|
||||||
(org-agenda-files nil)
|
(org-agenda-files nil)
|
||||||
|
Reference in New Issue
Block a user