Use -- to treat filenames as non-option args to gpg.

Ordinarily I'd also check that the filename was not "-", or perhaps
get the absolute path, but in this case I know the filename. (Otherwise
this could result in a hung process as gpg waited for stdin.)
This commit is contained in:
Tim McCormack 2013-02-05 20:25:26 -05:00
parent aa2bf6e3ce
commit f7fbda14c8

View file

@ -79,7 +79,7 @@
(let [{:keys [out err exit]} (try (shell/sh
(gpg-program)
"--quiet" "--batch"
"--decrypt" (str file))
"--decrypt" "--" (str file))
(catch java.io.IOException e
{:exit 1 :err (.getMessage e)}))]
(if (pos? exit)