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