home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.1.094 < prev    next >
Encoding:
Internet Message Format  |  2002-06-08  |  2.1 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.094
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.1.094
  11. Problem:    Cygwin: Passing a file name that has backslashes isn't handled
  12.         very well.
  13. Solution:   Convert file name arguments to Posix.  (Chris Metcalf)
  14. Files:        src/main.c
  15.  
  16.  
  17. *** ../vim61.093/src/main.c    Sun Apr 28 22:17:31 2002
  18. --- src/main.c    Sun Jun  9 20:47:47 2002
  19. ***************
  20. *** 22,27 ****
  21. --- 22,31 ----
  22.   # include <fcntl.h>
  23.   #endif
  24.   
  25. + #ifdef __CYGWIN__
  26. + # include <sys/cygwin.h>
  27. + #endif
  28.   #if defined(UNIX) || defined(VMS)
  29.   static int file_owned __ARGS((char *fname));
  30.   #endif
  31. ***************
  32. *** 971,976 ****
  33. --- 975,997 ----
  34.               p = r;
  35.           }
  36.           }
  37. + #endif
  38. + #ifdef __CYGWIN__
  39. +             /*
  40. +              * If vim is invoked by non-Cygwin tools, convert away any
  41. +              * DOS paths, so things like .swp files are created correctly.
  42. +              * Look for evidence of non-Cygwin paths before we bother.
  43. +              */
  44. +             if (strpbrk(p, "\\:") != NULL)
  45. +         {
  46. +                 char posix_path[PATH_MAX];
  47. +                 cygwin_conv_to_posix_path(p, posix_path);
  48. +                 vim_free(p);
  49. +                 p = vim_strsave(posix_path);
  50. +                 if (p == NULL)
  51. +                     mch_exit(2);
  52. +             }
  53.   #endif
  54.           alist_add(&global_alist, p,
  55.   #if (!defined(UNIX) && !defined(__EMX__)) || defined(ARCHIE)
  56. *** ../vim61.093/src/version.c    Sun Jun  9 20:34:00 2002
  57. --- src/version.c    Sun Jun  9 20:50:04 2002
  58. ***************
  59. *** 608,609 ****
  60. --- 608,611 ----
  61.   {   /* Add new patch number below this line */
  62. + /**/
  63. +     94,
  64.   /**/
  65.  
  66. -- 
  67. We are the Borg of GNU GPL.  We will assimilate you.
  68.  
  69.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  70. ///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
  71. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  72.  \\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///
  73.