diff options
author | Bram Moolenaar <Bram@vim.org> | 2004-09-06 17:44:46 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2004-09-06 17:44:46 +0000 |
commit | 15d0a8c77dad867b69822e2fd8f9f6bbcf765c48 (patch) | |
tree | e84faedc007f9c2b81b9056a400dccade2b947e5 /src/os_mswin.c | |
parent | d4755bb0e04fca334675f1503bd6474b017a9bba (diff) | |
download | vim-git-15d0a8c77dad867b69822e2fd8f9f6bbcf765c48.tar.gz |
updated for version 7.0015v7.0015
Diffstat (limited to 'src/os_mswin.c')
-rw-r--r-- | src/os_mswin.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/os_mswin.c b/src/os_mswin.c index 3ce61bc1d..7b5da8a4c 100644 --- a/src/os_mswin.c +++ b/src/os_mswin.c @@ -443,6 +443,10 @@ vim_stat(const char *name, struct stat *stp) p = buf + strlen(buf); if (p > buf) --p; +#ifdef FEAT_MBYTE + if (p > buf && has_mbyte) + p -= (*mb_head_off)(buf, p); +#endif if (p > buf && (*p == '\\' || *p == '/') && p[-1] != ':') *p = NUL; #ifdef FEAT_MBYTE @@ -624,6 +628,23 @@ mch_chdir(char *path) if (*path == NUL) /* drive name only */ return 0; +#ifdef FEAT_MBYTE + if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) + { + WCHAR *p = enc_to_ucs2(path, NULL); + int n; + + if (p != NULL) + { + n = _wchdir(p); + vim_free(p); + if (n == 0) + return 0; + /* Retry with non-wide function (for Windows 98). */ + } + } +#endif + return chdir(path); /* let the normal chdir() do the rest */ } |