diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-11-21 12:34:11 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-11-21 12:34:11 +0100 |
commit | ffa2220950a8f2856f4d7042768888c27e51178a (patch) | |
tree | 116358da1f165cf1bb97f4d782eefde493dc1297 /src | |
parent | 49b10273f0dd1b10e94ea675b18088a27364edbd (diff) | |
download | vim-ffa2220950a8f2856f4d7042768888c27e51178a.zip |
updated for version 7.4.096
Problem: Can't change directory to an UNC path.
Solution: Use win32_getattrs() in mch_getperm(). (Christian Brabandt)
Diffstat (limited to 'src')
-rw-r--r-- | src/os_win32.c | 15 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 10 insertions, 7 deletions
diff --git a/src/os_win32.c b/src/os_win32.c index cd29b8738..413dbfa0b 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -2841,18 +2841,20 @@ mch_dirname( } /* - * get file permissions for `name' - * -1 : error - * else mode_t + * Get file permissions for "name". + * Return mode_t or -1 for error. */ long mch_getperm(char_u *name) { struct stat st; - int n; + int n; + if (name[0] == '\\' && name[1] == '\\') + /* UNC path */ + return (long)win32_getattrs(name); n = mch_stat(name, &st); - return n == 0 ? (int)st.st_mode : -1; + return n == 0 ? (long)st.st_mode : -1L; } @@ -3094,8 +3096,7 @@ win32_fileinfo(char_u *fname, BY_HANDLE_FILE_INFORMATION *info) * -1 : error * else FILE_ATTRIBUTE_* defined in winnt.h */ - static - int + static int win32_getattrs(char_u *name) { int attr; diff --git a/src/version.c b/src/version.c index f4a60690a..89e6e1133 100644 --- a/src/version.c +++ b/src/version.c @@ -739,6 +739,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 96, +/**/ 95, /**/ 94, |