diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-06-20 14:02:27 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-06-20 14:02:27 +0200 |
commit | 9158f9e42355bfa1d956cb75cdaef37b4ab80f35 (patch) | |
tree | fe906325d497e863c8b2a3ce792d4c4e4e76ae07 /src/eval.c | |
parent | dc7e85ee5d29bd65681ff61b37d8e8cd38c22330 (diff) | |
download | vim-9158f9e42355bfa1d956cb75cdaef37b4ab80f35.zip |
updated for version 7.3.559
Problem: home_replace() does not work with 8.3 filename.
Solution: Make ":p" expand 8.3 name to full path. (Yasuhiro Matsumoto)
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index d238dc2ba..83e2016f1 100644 --- a/src/eval.c +++ b/src/eval.c @@ -23554,6 +23554,27 @@ repeat: return -1; } +#ifdef WIN3264 +# if _WIN32_WINNT >= 0x0500 + if (vim_strchr(*fnamep, '~') != NULL) + { + /* Expand 8.3 filename to full path. Needed to make sure the same + * file does not have two different names. + * Note: problem does not occur if _WIN32_WINNT < 0x0500. */ + p = alloc(_MAX_PATH + 1); + if (p != NULL) + { + if (GetLongPathName(*fnamep, p, MAXPATHL)) + { + vim_free(*bufp); + *bufp = *fnamep = p; + } + else + vim_free(p); + } + } +# endif +#endif /* Append a path separator to a directory. */ if (mch_isdir(*fnamep)) { |