mirror of
https://github.com/org-roam/org-roam
synced 2025-09-14 15:46:48 -05:00
Merge pull request #44 from jethrokuan/fix/symlinks-handling
Fix symlinks handling
This commit is contained in:
10
org-roam.el
10
org-roam.el
@@ -136,18 +136,20 @@ it will return the title by loading the file."
|
||||
|
||||
(defun org-roam--find-all-files ()
|
||||
"Return all org-roam files."
|
||||
(org-roam--find-files org-roam-directory))
|
||||
(org-roam--find-files (file-truename org-roam-directory)))
|
||||
|
||||
(defun org-roam--get-file-path (id &optional absolute)
|
||||
"Convert identifier `ID' to file path.
|
||||
|
||||
If `ABSOLUTE', return the absolute file-path. Else, return the relative file-path."
|
||||
(let ((absolute-file-path (expand-file-name
|
||||
(let ((absolute-file-path (file-truename
|
||||
(expand-file-name
|
||||
(concat id ".org")
|
||||
(file-truename org-roam-directory))))
|
||||
org-roam-directory))))
|
||||
(if absolute
|
||||
absolute-file-path
|
||||
(file-relative-name absolute-file-path org-roam-directory))))
|
||||
(file-relative-name absolute-file-path
|
||||
(file-truename org-roam-directory)))))
|
||||
|
||||
(defun org-roam--get-id (file-path)
|
||||
"Convert `FILE-PATH' to the org-roam id."
|
||||
|
Reference in New Issue
Block a user