To: [email protected]
Subject: Patch 6.0aw.010
Fcc: outbox
From: Bram Moolenaar <[email protected]>
------------

Patch 6.0aw.010
Problem:    Win32: ":browse edit dir/dir" didn't work. (Vikas)
Solution:   Change slashes to backslashes in the directory passed to the file
           browser.
Files:      src/gui_w48.c


*** ../vim-6.0aw/src/gui_w48.c  Sun Sep 16 22:21:06 2001
--- src/gui_w48.c       Tue Sep 18 20:56:44 2001
***************
*** 2704,2709 ****
--- 2704,2711 ----
 {
     OPENFILENAME      fileStruct;
     char_u            fileBuf[MAXPATHL], *p;
+     char_u            dirbuf[MAXPATHL + 1];
+     int                       i;

     if (dflt == NULL)
       fileBuf[0] = '\0';
***************
*** 2726,2732 ****
     fileStruct.hwndOwner = s_hwnd;            /* main Vim window is owner*/
     /* has an initial dir been specified? */
     if (initdir != NULL && *initdir != NUL)
!       fileStruct.lpstrInitialDir = initdir;

     /*
      * TODO: Allow selection of multiple files.  Needs another arg to this
--- 2728,2745 ----
     fileStruct.hwndOwner = s_hwnd;            /* main Vim window is owner*/
     /* has an initial dir been specified? */
     if (initdir != NULL && *initdir != NUL)
!     {
!       /* Must have backslashes here, no matter what 'shellslash' says */
!       for (i = 0; i < MAXPATHL && initdir[i] != NUL; ++i)
!       {
!           if (initdir[i] == '/')
!               dirbuf[i] = '\\';
!           else
!               dirbuf[i] = initdir[i];
!       }
!       dirbuf[i] = NUL;
!       fileStruct.lpstrInitialDir = dirbuf;
!     }

     /*
      * TODO: Allow selection of multiple files.  Needs another arg to this

--
TALL KNIGHT OF NI: Ni!
                "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

///  Bram Moolenaar -- [email protected] -- http://www.moolenaar.net  \\\
(((   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   )))
\\\  Help me helping AIDS orphans in Uganda - http://iccf-holland.org  ///