To: vim-dev@vim.org Subject: Patch 6.2.324 (extra) Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.324 (extra) Problem: Win32: when "vimrun.exe" has a path with white space, such as "Program Files", executing external commands may fail. Solution: Put double quotes around the path to "vimrun". Files: src/os_win32.c *** ../vim-6.2.323/src/os_win32.c Sun Feb 29 14:48:02 2004 --- src/os_win32.c Sun Mar 7 16:08:19 2004 *************** *** 1492,1505 **** /* Look for 'vimrun' */ if (!gui_is_win32s()) { ! char_u vimrun_location[_MAX_PATH + 2]; /* First try in same directory as gvim.exe */ STRCPY(vimrun_location, exe_name); STRCPY(gettail(vimrun_location), "vimrun.exe"); if (mch_getperm(vimrun_location) >= 0) { ! STRCPY(gettail(vimrun_location), "vimrun "); vimrun_path = (char *)vim_strsave(vimrun_location); s_dont_use_vimrun = FALSE; } --- 1492,1515 ---- /* Look for 'vimrun' */ if (!gui_is_win32s()) { ! char_u vimrun_location[_MAX_PATH + 4]; /* First try in same directory as gvim.exe */ STRCPY(vimrun_location, exe_name); STRCPY(gettail(vimrun_location), "vimrun.exe"); if (mch_getperm(vimrun_location) >= 0) { ! if (*skiptowhite(vimrun_location) != NUL) ! { ! /* Enclose path with white space in double quotes. */ ! mch_memmove(vimrun_location + 1, vimrun_location, ! STRLEN(vimrun_location) + 1); ! *vimrun_location = '"'; ! STRCPY(gettail(vimrun_location), "vimrun\" "); ! } ! else ! STRCPY(gettail(vimrun_location), "vimrun "); ! vimrun_path = (char *)vim_strsave(vimrun_location); s_dont_use_vimrun = FALSE; } *** ../vim-6.2.323/src/version.c Sun Mar 7 15:21:39 2004 --- src/version.c Sun Mar 7 16:20:50 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 324, /**/ -- Another bucket of what can only be described as human ordure hits ARTHUR. ARTHUR: ... Right! (to the KNIGHTS) That settles it! "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///