home *** CD-ROM | disk | FTP | other *** search
- To: vim-dev@vim.org
- Subject: Patch 6.1.094
- Fcc: outbox
- From: Bram Moolenaar <Bram@moolenaar.net>
- MIME-Version: 1.0
- Content-Type: text/plain; charset=ISO-8859-1
- Content-Transfer-Encoding: 8bit
- ------------
-
- Patch 6.1.094
- Problem: Cygwin: Passing a file name that has backslashes isn't handled
- very well.
- Solution: Convert file name arguments to Posix. (Chris Metcalf)
- Files: src/main.c
-
-
- *** ../vim61.093/src/main.c Sun Apr 28 22:17:31 2002
- --- src/main.c Sun Jun 9 20:47:47 2002
- ***************
- *** 22,27 ****
- --- 22,31 ----
- # include <fcntl.h>
- #endif
-
- + #ifdef __CYGWIN__
- + # include <sys/cygwin.h>
- + #endif
- +
- #if defined(UNIX) || defined(VMS)
- static int file_owned __ARGS((char *fname));
- #endif
- ***************
- *** 971,976 ****
- --- 975,997 ----
- p = r;
- }
- }
- + #endif
- + #ifdef __CYGWIN__
- + /*
- + * If vim is invoked by non-Cygwin tools, convert away any
- + * DOS paths, so things like .swp files are created correctly.
- + * Look for evidence of non-Cygwin paths before we bother.
- + */
- + if (strpbrk(p, "\\:") != NULL)
- + {
- + char posix_path[PATH_MAX];
- +
- + cygwin_conv_to_posix_path(p, posix_path);
- + vim_free(p);
- + p = vim_strsave(posix_path);
- + if (p == NULL)
- + mch_exit(2);
- + }
- #endif
- alist_add(&global_alist, p,
- #if (!defined(UNIX) && !defined(__EMX__)) || defined(ARCHIE)
- *** ../vim61.093/src/version.c Sun Jun 9 20:34:00 2002
- --- src/version.c Sun Jun 9 20:50:04 2002
- ***************
- *** 608,609 ****
- --- 608,611 ----
- { /* Add new patch number below this line */
- + /**/
- + 94,
- /**/
-
- --
- We are the Borg of GNU GPL. We will assimilate you.
-
- /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\
- /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
- \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
- \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
-