jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.096

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