mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(fix): fix bad behaviour on malformed properties (#763)
Org-roam now skips over bad properties and throws a warning for the given file that contains a malformed property. This allows most of the database rebuild to complete, and for the user to fix the offending file. Fixes #728.
This commit is contained in:
@ -39,6 +39,7 @@
|
||||
|
||||
(defvar org-roam-directory)
|
||||
(defvar org-roam-verbose)
|
||||
(defvar org-roam-file-name)
|
||||
|
||||
(declare-function org-roam--org-roam-file-p "org-roam")
|
||||
(declare-function org-roam--extract-titles "org-roam")
|
||||
@ -387,8 +388,7 @@ If FORCE, force a rebuild of the cache from scratch."
|
||||
(let* ((attr (file-attributes file))
|
||||
(atime (file-attribute-access-time attr))
|
||||
(mtime (file-attribute-modification-time attr)))
|
||||
(org-roam--with-temp-buffer
|
||||
(insert-file-contents file)
|
||||
(org-roam--with-temp-buffer file
|
||||
(let ((contents-hash (secure-hash 'sha1 (current-buffer))))
|
||||
(unless (string= (gethash file current-files)
|
||||
contents-hash)
|
||||
|
Reference in New Issue
Block a user