(fix): caching symlinked files (#2112)

* Revert "(fix): `org-roam-descendant-of-p` bug on Windows (#2089)"

This reverts commit 97a342fd3f.

Reason:

It seems that the `file-in-directory-p` function proposed in #2089 is provided only for
*physical directories*, does not work as we would like with *symlinked directories*.
It dereferences all the symlinks in its path, and previously seemed related paths
cease to be such.

Because of this, such notes are ignored and not indexed, although they
were indexed earlier.
This commit is contained in:
PRESFIL
2022-03-04 09:47:24 +03:00
committed by GitHub
parent 65ea325071
commit f50d6e7376
3 changed files with 9 additions and 2 deletions

View File

@ -194,7 +194,7 @@ FILE is an Org-roam file if:
(member ext org-roam-file-extensions)
(not (and org-roam-file-exclude-regexp
(string-match-p org-roam-file-exclude-regexp path)))
(file-in-directory-p path (expand-file-name org-roam-directory))))))
(org-roam-descendant-of-p path (expand-file-name org-roam-directory))))))
(defun org-roam-list-files ()
"Return a list of all Org-roam files under `org-roam-directory'.