branch: externals/denote
commit 916dde6ba7d17de93e93a98eedbb9feda9496944
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Throw error if denote-get-file-name-relative-to-denote-directory FILE is
not absolute
---
denote.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/denote.el b/denote.el
index 36a219266d..e3ea13134e 100644
--- a/denote.el
+++ b/denote.el
@@ -1254,8 +1254,9 @@ what remains."
(defun denote-get-file-name-relative-to-denote-directory (file)
"Return name of FILE relative to the variable `denote-directory'.
FILE must be an absolute path."
+ (unless (file-name-absolute-p file)
+ (error "The file `%s' is not absolute" file))
(when-let* ((directories (denote-directories))
- ((file-name-absolute-p file))
(file-name (expand-file-name file))
(directory (seq-find
(lambda (d)