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 / 7.3 / 7.3.027 < prev    next >
Encoding:
Internet Message Format  |  2012-11-20  |  2.6 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.3.027
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.3.027
  11. Problem:    Opening a file on a network share is very slow.
  12. Solution:   When fixing file name case append "\*" to directory, server and
  13.         network share names. (David Anderson, John Beckett)
  14. Files:        src/os_win32.c
  15.  
  16.  
  17. *** ../vim-7.3.026/src/os_win32.c    2010-09-21 17:29:19.000000000 +0200
  18. --- src/os_win32.c    2010-10-13 20:31:32.000000000 +0200
  19. ***************
  20. *** 2308,2319 ****
  21. --- 2308,2321 ----
  22.       int        len)
  23.   {
  24.       char        szTrueName[_MAX_PATH + 2];
  25. +     char        szTrueNameTemp[_MAX_PATH + 2];
  26.       char        *ptrue, *ptruePrev;
  27.       char        *porig, *porigPrev;
  28.       int            flen;
  29.       WIN32_FIND_DATA    fb;
  30.       HANDLE        hFind;
  31.       int            c;
  32. +     int            slen;
  33.   
  34.       flen = (int)STRLEN(name);
  35.       if (flen == 0 || flen > _MAX_PATH)
  36. ***************
  37. *** 2358,2369 ****
  38.       }
  39.       *ptrue = NUL;
  40.   
  41.       /* Skip "", "." and "..". */
  42.       if (ptrue > ptruePrev
  43.           && (ptruePrev[0] != '.'
  44.               || (ptruePrev[1] != NUL
  45.               && (ptruePrev[1] != '.' || ptruePrev[2] != NUL)))
  46. !         && (hFind = FindFirstFile(szTrueName, &fb))
  47.                                 != INVALID_HANDLE_VALUE)
  48.       {
  49.           c = *porig;
  50. --- 2360,2378 ----
  51.       }
  52.       *ptrue = NUL;
  53.   
  54. +     /* To avoid a slow failure append "\*" when searching a directory,
  55. +      * server or network share. */
  56. +     STRCPY(szTrueNameTemp, szTrueName);
  57. +     slen = strlen(szTrueNameTemp);
  58. +     if (*porig == psepc && slen + 2 < _MAX_PATH)
  59. +         STRCPY(szTrueNameTemp + slen, "\\*");
  60.       /* Skip "", "." and "..". */
  61.       if (ptrue > ptruePrev
  62.           && (ptruePrev[0] != '.'
  63.               || (ptruePrev[1] != NUL
  64.               && (ptruePrev[1] != '.' || ptruePrev[2] != NUL)))
  65. !         && (hFind = FindFirstFile(szTrueNameTemp, &fb))
  66.                                 != INVALID_HANDLE_VALUE)
  67.       {
  68.           c = *porig;
  69. *** ../vim-7.3.026/src/version.c    2010-10-13 18:06:42.000000000 +0200
  70. --- src/version.c    2010-10-13 20:37:00.000000000 +0200
  71. ***************
  72. *** 716,717 ****
  73. --- 716,719 ----
  74.   {   /* Add new patch number below this line */
  75. + /**/
  76. +     27,
  77.   /**/
  78.  
  79. -- 
  80.    A cow comes flying over the battlements,  lowing aggressively.  The cow
  81.    lands on GALAHAD'S PAGE, squashing him completely.
  82.                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
  83.  
  84.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  85. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  86. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  87.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  88.