To: vim_dev@googlegroups.com Subject: Patch 7.4.096 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.096 Problem: Can't change directory to an UNC path. Solution: Use win32_getattrs() in mch_getperm(). (Christian Brabandt) Files: src/os_win32.c *** ../vim-7.4.095/src/os_win32.c 2013-09-25 19:13:32.000000000 +0200 --- src/os_win32.c 2013-11-21 12:31:52.000000000 +0100 *************** *** 2841,2858 **** } /* ! * get file permissions for `name' ! * -1 : error ! * else mode_t */ long mch_getperm(char_u *name) { struct stat st; ! int n; n = mch_stat(name, &st); ! return n == 0 ? (int)st.st_mode : -1; } --- 2841,2860 ---- } /* ! * Get file permissions for "name". ! * Return mode_t or -1 for error. */ long mch_getperm(char_u *name) { struct stat st; ! int n; + if (name[0] == '\\' && name[1] == '\\') + /* UNC path */ + return (long)win32_getattrs(name); n = mch_stat(name, &st); ! return n == 0 ? (long)st.st_mode : -1L; } *************** *** 3094,3101 **** * -1 : error * else FILE_ATTRIBUTE_* defined in winnt.h */ ! static ! int win32_getattrs(char_u *name) { int attr; --- 3096,3102 ---- * -1 : error * else FILE_ATTRIBUTE_* defined in winnt.h */ ! static int win32_getattrs(char_u *name) { int attr; *** ../vim-7.4.095/src/version.c 2013-11-21 12:17:46.000000000 +0100 --- src/version.c 2013-11-21 12:32:46.000000000 +0100 *************** *** 740,741 **** --- 740,743 ---- { /* Add new patch number below this line */ + /**/ + 96, /**/ -- If your company is not involved in something called "ISO 9000" you probably have no idea what it is. If your company _is_ involved in ISO 9000 then you definitely have no idea what it is. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///