From 3a92b2a5411aabb096ad592efe7d2dc085653ee6 Mon Sep 17 00:00:00 2001 From: Jacob Matthews Date: Tue, 7 Apr 2015 12:52:25 -0500 Subject: [PATCH] org-mobile.org: Properly escape checksum binary path * lisp/org-mobile.org (org-mobile-copy-agenda-files): Escape org-mobile-checksum-binary. Fix a bug where if the checksum binary is in a non shell-safe path, then the shell invocation silently fails. This can happen on any platform but is probably worst on Windows where it's common to put programs in "C:/Program Files". --- lisp/org-mobile.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el index c2828a9..2c13802 100644 --- a/lisp/org-mobile.el +++ b/lisp/org-mobile.el @@ -499,7 +499,8 @@ agenda view showing the flagged items." (org-mobile-encrypt-and-move file target-path) (copy-file file target-path 'ok-if-exists)) (setq check (shell-command-to-string - (concat org-mobile-checksum-binary " " + (concat (shell-quote-argument org-mobile-checksum-binary) + " " (shell-quote-argument (expand-file-name file))))) (when (string-match "[a-fA-F0-9]\\{30,40\\}" check) (push (cons link-name (match-string 0 check)) -- 2.2.0.rc0.207.ga3a616c