diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-02-11 17:06:00 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-02-11 17:06:00 +0100 |
commit | cd981f2e0f00613a63b46e1e6b5227d5993ba994 (patch) | |
tree | 7d5196708805cfbab8d734ca6b732527cc0d1567 /src/os_mswin.c | |
parent | 3b5226121ddefaa51c1dbb844bfb7124386fe4a8 (diff) | |
download | vim-git-cd981f2e0f00613a63b46e1e6b5227d5993ba994.tar.gz |
updated for version 7.4.175v7.4.175
Problem: When a wide library function fails, falling back to the non-wide
function may do the wrong thing.
Solution: Check the platform, when the wide function is supported don't fall
back to the non-wide function. (Ken Takata)
Diffstat (limited to 'src/os_mswin.c')
-rw-r--r-- | src/os_mswin.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/os_mswin.c b/src/os_mswin.c index c7eab50d5..bf9acdbbf 100644 --- a/src/os_mswin.c +++ b/src/os_mswin.c @@ -648,7 +648,7 @@ vim_stat(const char *name, struct stat *stp) { n = wstat_symlink_aware(wp, (struct _stat *)stp); vim_free(wp); - if (n >= 0) + if (n >= 0 || g_PlatformId == VER_PLATFORM_WIN32_NT) return n; /* Retry with non-wide function (for Windows 98). Can't use * GetLastError() here and it's unclear what errno gets set to if @@ -815,8 +815,8 @@ mch_chdir(char *path) { n = _wchdir(p); vim_free(p); - if (n == 0) - return 0; + if (n == 0 || g_PlatformId == VER_PLATFORM_WIN32_NT) + return n; /* Retry with non-wide function (for Windows 98). */ } } @@ -1942,8 +1942,7 @@ mch_resolve_shortcut(char_u *fname) shortcut_errorw: vim_free(p); - if (hr == S_OK) - goto shortcut_end; + goto shortcut_end; } } /* Retry with non-wide function (for Windows 98). */ |