diff src/evalfunc.c @ 14393:c62601adad69 v8.1.0211

patch 8.1.0211: expanding a file name "~" results in $HOME commit https://github.com/vim/vim/commit/00136dc321586800986e8f743c2f108f5eecbf92 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 25 21:19:13 2018 +0200 patch 8.1.0211: expanding a file name "~" results in $HOME Problem: Expanding a file name "~" results in $HOME. (Aidan Shafran) Solution: Change "~" to "./~" before expanding. (closes https://github.com/vim/vim/issues/3072)
author Christian Brabandt <cb@256bit.org>
date Wed, 25 Jul 2018 21:30:06 +0200
parents 46f14852a919
children e7d1bc5ee3b8
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -3801,7 +3801,7 @@ f_fnamemodify(typval_T *argvars, typval_
     else
     {
 	len = (int)STRLEN(fname);
-	(void)modify_fname(mods, &usedlen, &fname, &fbuf, &len);
+	(void)modify_fname(mods, FALSE, &usedlen, &fname, &fbuf, &len);
     }
 
     rettv->v_type = VAR_STRING;