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