To: vim-dev@vim.org Subject: Patch 6.1.397 (extra) Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.397 (extra) Problem: The install program may use a wrong path for the diff command if there is a space in the install directory path. Solution: Use double quotes around the path if necessary. (Alejandro Lopez-Valencia) Also use double quotes around the file name arguments. Files: src/dosinst.c *** ../vim61.396/src/dosinst.c Sun Feb 10 16:28:26 2002 --- src/dosinst.c Wed Mar 12 21:25:55 2003 *************** *** 1176,1182 **** fprintf(fd, " let opt = ''\n"); fprintf(fd, " if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif\n"); fprintf(fd, " if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif\n"); ! fprintf(fd, " silent execute '!%s\\diff -a ' . opt . v:fname_in . ' ' . v:fname_new . ' > ' . v:fname_out\n", installdir); fprintf(fd, "endfunction\n"); fprintf(fd, "\n"); } --- 1176,1186 ---- fprintf(fd, " let opt = ''\n"); fprintf(fd, " if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif\n"); fprintf(fd, " if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif\n"); ! /* Use quotes here if the path includes a space. */ ! if (strchr(installdir, ' ') != NULL) ! fprintf(fd, " silent execute '!\"%s\\diff\" -a ' . opt . '\"' . v:fname_in . '\" \"' . v:fname_new . '\" > \"' . v:fname_out . '\"'\n", installdir); ! else ! fprintf(fd, " silent execute '!%s\\diff -a ' . opt . '\"' . v:fname_in . '\" \"' . v:fname_new . '\" > \"' . v:fname_out . '\"'\n", installdir); fprintf(fd, "endfunction\n"); fprintf(fd, "\n"); } *** ../vim61.396/src/version.c Sat Mar 15 16:23:36 2003 --- src/version.c Sat Mar 15 16:26:18 2003 *************** *** 613,614 **** --- 613,616 ---- { /* Add new patch number below this line */ + /**/ + 397, /**/ -- From "know your smileys": :----} You lie like Pinocchio /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///