mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(fix): org-roam--list-files: canonicalize filenames (#735)
This commit is contained in:
@ -380,7 +380,7 @@ If FORCE, force a rebuild of the cache from scratch."
|
||||
(when force (delete-file (org-roam-db--get)))
|
||||
(org-roam-db--close) ;; Force a reconnect
|
||||
(org-roam-db) ;; To initialize the database, no-op if already initialized
|
||||
(let* ((org-roam-files (seq-filter #'org-roam--org-roam-file-p (org-roam--list-all-files)))
|
||||
(let* ((org-roam-files (org-roam--list-all-files))
|
||||
(current-files (org-roam-db--get-current-files))
|
||||
all-files all-links all-titles all-refs all-tags)
|
||||
(dolist (file org-roam-files)
|
||||
|
15
org-roam.el
15
org-roam.el
@ -349,12 +349,15 @@ Use external shell commands if defined in `org-roam-list-files-commands'."
|
||||
`((consp symbolp)
|
||||
,wrong-type))))
|
||||
(when path (cl-return)))
|
||||
(if path
|
||||
(let ((fn (intern (concat "org-roam--list-files-" exe))))
|
||||
(unless (fboundp fn) (user-error "%s is not an implemented search method" fn))
|
||||
(mapcar #'ansi-color-filter-apply
|
||||
(funcall fn path (format "\"%s\"" dir))))
|
||||
(org-roam--list-files-elisp dir))))
|
||||
(let* ((files (if path
|
||||
(let ((fn (intern (concat "org-roam--list-files-" exe))))
|
||||
(unless (fboundp fn) (user-error "%s is not an implemented search method" fn))
|
||||
(funcall fn path (format "\"%s\"" dir)))
|
||||
(org-roam--list-files-elisp dir)))
|
||||
(files (mapcar #'ansi-color-filter-apply files)) ; strip ansi codes
|
||||
(files (seq-filter #'org-roam--org-roam-file-p files))
|
||||
(files (mapcar #'expand-file-name files))) ; canonicalize names
|
||||
files)))
|
||||
|
||||
(defun org-roam--list-all-files ()
|
||||
"Return a list of all Org-roam files within `org-roam-directory'."
|
||||
|
Reference in New Issue
Block a user