Karsten Hopp 2072d6
To: vim_dev@googlegroups.com
Karsten Hopp 2072d6
Subject: Patch 7.4.656
Karsten Hopp 2072d6
Fcc: outbox
Karsten Hopp 2072d6
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 2072d6
Mime-Version: 1.0
Karsten Hopp 2072d6
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 2072d6
Content-Transfer-Encoding: 8bit
Karsten Hopp 2072d6
------------
Karsten Hopp 2072d6
Karsten Hopp 2072d6
Patch 7.4.656 (after 7.4.654)
Karsten Hopp 2072d6
Problem:    Missing changes for glob() in one file.
Karsten Hopp 2072d6
Solution:   Add the missing changes.
Karsten Hopp 2072d6
Files:	    src/misc1.c
Karsten Hopp 2072d6
Karsten Hopp 2072d6
Karsten Hopp 2072d6
*** ../vim-7.4.655/src/misc1.c	2015-02-10 18:33:53.240319951 +0100
Karsten Hopp 2072d6
--- src/misc1.c	2015-03-05 18:27:16.608501389 +0100
Karsten Hopp 2072d6
***************
Karsten Hopp 2072d6
*** 10168,10178 ****
Karsten Hopp 2072d6
  		}
Karsten Hopp 2072d6
  		else
Karsten Hopp 2072d6
  		{
Karsten Hopp 2072d6
  		    /* no more wildcards, check if there is a match */
Karsten Hopp 2072d6
  		    /* remove backslashes for the remaining components only */
Karsten Hopp 2072d6
  		    if (*path_end != NUL)
Karsten Hopp 2072d6
  			backslash_halve(buf + len + 1);
Karsten Hopp 2072d6
! 		    if (mch_getperm(buf) >= 0)	/* add existing file */
Karsten Hopp 2072d6
  		    {
Karsten Hopp 2072d6
  #ifdef MACOS_CONVERT
Karsten Hopp 2072d6
  			size_t precomp_len = STRLEN(buf)+1;
Karsten Hopp 2072d6
--- 10168,10182 ----
Karsten Hopp 2072d6
  		}
Karsten Hopp 2072d6
  		else
Karsten Hopp 2072d6
  		{
Karsten Hopp 2072d6
+ 		    struct stat sb;
Karsten Hopp 2072d6
+ 
Karsten Hopp 2072d6
  		    /* no more wildcards, check if there is a match */
Karsten Hopp 2072d6
  		    /* remove backslashes for the remaining components only */
Karsten Hopp 2072d6
  		    if (*path_end != NUL)
Karsten Hopp 2072d6
  			backslash_halve(buf + len + 1);
Karsten Hopp 2072d6
! 		    /* add existing file or symbolic link */
Karsten Hopp 2072d6
! 		    if ((flags & EW_ALLLINKS) ? mch_lstat(buf, &sb) >= 0
Karsten Hopp 2072d6
! 						      : mch_getperm(buf) >= 0)
Karsten Hopp 2072d6
  		    {
Karsten Hopp 2072d6
  #ifdef MACOS_CONVERT
Karsten Hopp 2072d6
  			size_t precomp_len = STRLEN(buf)+1;
Karsten Hopp 2072d6
***************
Karsten Hopp 2072d6
*** 10919,10924 ****
Karsten Hopp 2072d6
--- 10923,10929 ----
Karsten Hopp 2072d6
   * EW_EXEC	add executable files
Karsten Hopp 2072d6
   * EW_NOTFOUND	add even when it doesn't exist
Karsten Hopp 2072d6
   * EW_ADDSLASH	add slash after directory name
Karsten Hopp 2072d6
+  * EW_ALLLINKS	add symlink also when the referred file does not exist
Karsten Hopp 2072d6
   */
Karsten Hopp 2072d6
      void
Karsten Hopp 2072d6
  addfile(gap, f, flags)
Karsten Hopp 2072d6
***************
Karsten Hopp 2072d6
*** 10928,10936 ****
Karsten Hopp 2072d6
  {
Karsten Hopp 2072d6
      char_u	*p;
Karsten Hopp 2072d6
      int		isdir;
Karsten Hopp 2072d6
  
Karsten Hopp 2072d6
!     /* if the file/dir doesn't exist, may not add it */
Karsten Hopp 2072d6
!     if (!(flags & EW_NOTFOUND) && mch_getperm(f) < 0)
Karsten Hopp 2072d6
  	return;
Karsten Hopp 2072d6
  
Karsten Hopp 2072d6
  #ifdef FNAME_ILLEGAL
Karsten Hopp 2072d6
--- 10933,10943 ----
Karsten Hopp 2072d6
  {
Karsten Hopp 2072d6
      char_u	*p;
Karsten Hopp 2072d6
      int		isdir;
Karsten Hopp 2072d6
+     struct stat sb;
Karsten Hopp 2072d6
  
Karsten Hopp 2072d6
!     /* if the file/dir/link doesn't exist, may not add it */
Karsten Hopp 2072d6
!     if (!(flags & EW_NOTFOUND) && ((flags & EW_ALLLINKS)
Karsten Hopp 2072d6
! 				? mch_lstat(f, &sb) < 0 : mch_getperm(f) < 0))
Karsten Hopp 2072d6
  	return;
Karsten Hopp 2072d6
  
Karsten Hopp 2072d6
  #ifdef FNAME_ILLEGAL
Karsten Hopp 2072d6
*** ../vim-7.4.655/src/version.c	2015-03-05 19:57:45.322721298 +0100
Karsten Hopp 2072d6
--- src/version.c	2015-03-05 21:20:17.482011863 +0100
Karsten Hopp 2072d6
***************
Karsten Hopp 2072d6
*** 743,744 ****
Karsten Hopp 2072d6
--- 743,746 ----
Karsten Hopp 2072d6
  {   /* Add new patch number below this line */
Karsten Hopp 2072d6
+ /**/
Karsten Hopp 2072d6
+     656,
Karsten Hopp 2072d6
  /**/
Karsten Hopp 2072d6
Karsten Hopp 2072d6
-- 
Karsten Hopp 2072d6
You had connectors?  Eeee, when I were a lad we 'ad to carry the
Karsten Hopp 2072d6
bits between the computer and the terminal with a spoon...
Karsten Hopp 2072d6
Karsten Hopp 2072d6
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 2072d6
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 2072d6
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 2072d6
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///