forked from mirrors/org-mode
org-attach-attach: Avoid linking to path starting with ~
* lisp/org-attach.el (org-attach-attach): Auto-expand ~ in the file patch when using symlink (`lns') attach method. Fixes https://orgmode.org/list/CAN_Dec_LyTKgSN_kiftee9GULM7FPER5frQFant3n_2C3cwM-g@mail.gmail.com
This commit is contained in:
parent
4e42500613
commit
ad304faea1
|
@ -525,7 +525,8 @@ 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))
|
||||
;; We pass integer third argument to auto-expand "~" in FILE.
|
||||
((eq method 'lns) (make-symbolic-link file attach-file 1))
|
||||
((eq method 'url) (url-copy-file file attach-file)))
|
||||
(run-hook-with-args 'org-attach-after-change-hook attach-dir)
|
||||
(org-attach-tag)
|
||||
|
|
Loading…
Reference in a new issue