From f618fb512e62ccb2e700242a7678dacbc2b025e2 Mon Sep 17 00:00:00 2001 From: Matt Price Date: Mon, 15 Nov 2021 08:14:37 -0500 Subject: [PATCH] org-attach-attach: expand file names before linking when using symbolic links for attachments, ensure links are fully expanded to avoid filesystem errors. --- lisp/org-attach.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-attach.el b/lisp/org-attach.el index 75db69c9c..abdce3e7a 100644 --- a/lisp/org-attach.el +++ b/lisp/org-attach.el @@ -523,7 +523,7 @@ METHOD may be `cp', `mv', `ln', `lns' or `url' default taken from ((eq method 'mv) (rename-file file attach-file)) ((eq method 'cp) (copy-file file attach-file)) ((eq method 'ln) (add-name-to-file file attach-file)) - ((eq method 'lns) (make-symbolic-link file attach-file)) + ((eq method 'lns) (make-symbolic-link (expand-file-name file) attach-file)) ((eq method 'url) (url-copy-file file attach-file))) (run-hook-with-args 'org-attach-after-change-hook attach-dir) (org-attach-tag) -- 2.33.1