Browse Source

Fix default directory for git-annex checks

* lisp/org-attach.el: (org-attach-annex-get-maybe) Ensure shell
  command that checks whether a git-annex file exists is called from
  within the git-annex repository. Otherwise, it will result in an
  error.
Matt Lundin 7 năm trước cách đây
mục cha
commit
407014e068
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      lisp/org-attach.el

+ 2 - 1
lisp/org-attach.el

@@ -319,7 +319,8 @@ the ATTACH_DIR property) their own attachment directory."
 (defun org-attach-annex-get-maybe (path)
   "Call git annex get PATH (via shell) if using git annex.
 Signals an error if the file content is not available and it was not retrieved."
-  (let ((path-relative (file-relative-name path)))
+  (let* ((default-directory (expand-file-name org-attach-directory))
+	 (path-relative (file-relative-name path)))
     (when (and (org-attach-use-annex)
 	       (not
 		(string-equal