summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Matthews <matthewsj@google.com>2015-04-07 12:52:25 -0500
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2015-04-10 10:25:23 +0200
commitd0bb993f7020cc0dc527e8241687b6239170a70e (patch)
treeb0b985ccec3d06dd813709002875f47e8a81574a
parent19a7d6864d0566597dfcc3c80320966864f8198b (diff)
downloadorg-mode-d0bb993f7020cc0dc527e8241687b6239170a70e.tar.gz
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". TINYCHANGE
-rw-r--r--lisp/org-mobile.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
index 41a9958..9c87791 100644
--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -501,7 +501,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))