diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1998-08-27 09:51:21 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1998-08-27 09:51:21 +0000 |
commit | ded841840b473842a49f4f3627f488ca323d05b1 (patch) | |
tree | 77ccc600bba3b9f794dbb7a689416d950b16725e /mx.c | |
parent | 805fcf41165c20f8b38ad76e8518114f9b976117 (diff) |
[patch-0.94.4i.tlr.shell_quote.1] Try to quote file name
arguments and the like for shell commands.
Diffstat (limited to 'mx.c')
-rw-r--r-- | mx.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -73,10 +73,13 @@ static int invoke_dotlock(const char *path, int flags, int retry) { char cmd[LONG_STRING + _POSIX_PATH_MAX]; char r[SHORT_STRING]; + char *f; if(flags & DL_FL_RETRY) snprintf(r, sizeof(r), "-r %d ", retry ? MAXLOCKATTEMPT : 0); + f = mutt_quote_filename(path); + snprintf(cmd, sizeof(cmd), "%s %s%s%s%s%s%s", DOTLOCK, @@ -85,7 +88,9 @@ static int invoke_dotlock(const char *path, int flags, int retry) flags & DL_FL_USEPRIV ? "-p " : "", flags & DL_FL_FORCE ? "-f " : "", flags & DL_FL_RETRY ? r : "", - path); + f); + + FREE(&f); return mutt_system(cmd); } |