aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-01-21 10:28:52 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-01-21 12:21:47 +0100
commit456cf72974865cecf489bc5a5b4003c22745a77d (patch)
treed98b8ded40c7ddaf1becf4d2215b1315aad1ec1b /src/nvim/diff.c
parentce09d4134b05cfdf6f71bcc93bb5cb9e48e4d9a0 (diff)
downloadrneovim-456cf72974865cecf489bc5a5b4003c22745a77d.tar.gz
rneovim-456cf72974865cecf489bc5a5b4003c22745a77d.tar.bz2
rneovim-456cf72974865cecf489bc5a5b4003c22745a77d.zip
vim-patch:8.0.0442: patch shell command not well escaped
Problem: Patch shell command uses double quotes around the argument, which allows for $HOME to be expanded. (Etienne) Solution: Use single quotes on Unix. (closes vim/vim#1543) https://github.com/vim/vim/commit/1ef73e33c9414eb02c229d8234aafd9d481a8856
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r--src/nvim/diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c
index dd489c18e9..4db81a97a2 100644
--- a/src/nvim/diff.c
+++ b/src/nvim/diff.c
@@ -925,7 +925,7 @@ void ex_diffpatch(exarg_T *eap)
} else {
// Build the patch command and execute it. Ignore errors.
#ifdef UNIX
- vim_snprintf((char *)buf, buflen, "patch -o %s %s < \"%s\"",
+ vim_snprintf((char *)buf, buflen, "patch -o %s %s < '%s'",
tmp_new, tmp_orig, fullname != NULL ? fullname : eap->arg);
#else
vim_snprintf((char *)buf, buflen, "patch -o %s %s < \"%s\"",