Skip to content

Commit

Permalink
(fix): dailies: prevent inclusion of non-org-roam files
Browse files Browse the repository at this point in the history
  • Loading branch information
juergenhoetzel committed Jan 28, 2021
1 parent fde40dc commit 282725f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions org-roam-dailies.el
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,14 @@ Prefer past dates, unless PREFER-FUTURE is non-nil."
(defun org-roam-dailies--list-files (&rest extra-files)
"List all files in `org-roam-dailies-directory'.
EXTRA-FILES can be used to append extra files to the list."
(let ((dir (org-roam-dailies-directory--get-absolute-path)))
(let ((dir (org-roam-dailies-directory--get-absolute-path))
(regexp (rx "." (eval `(or ,@org-roam-file-extensions)))))
(append (--remove (let ((file (file-name-nondirectory it)))
(when (or (auto-save-file-name-p file)
(backup-file-name-p file)
(string-match "^\\." file))
it))
(directory-files-recursively dir ""))
(directory-files-recursively dir regexp))
extra-files)))

(defun org-roam-dailies-find-next-note (&optional n)
Expand Down

0 comments on commit 282725f

Please sign in to comment.