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 / old / 5.5.060 < prev    next >
Encoding:
Internet Message Format  |  1999-12-06  |  2.2 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 5.5.060 (extra)
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. ------------
  6.  
  7. Patch 5.5.060 (extra)
  8. Problem:    Dos 32 bit: When a directory in 'backupdir' doesn't exist, ":w"
  9.             causes the file to be renamed to "axlqwqhy.ba~". (Matzdorf)
  10. Solution:   The code to work around a LFN bug in Windows 95 doesn't handle a
  11.             non-existing target name correctly.  When renaming fails, make
  12.             sure the file has its original name.  Also do this for the Win32
  13.             version, although it's unlikely that it runs into this problem.
  14. Files:      src/os_msdos.c, src/os_win32.c
  15.  
  16.  
  17. *** ../vim-5.5.59/src/os_msdos.c    Wed Sep 22 10:06:26 1999
  18. --- src/os_msdos.c    Tue Dec  7 10:27:47 1999
  19. ***************
  20. *** 1970,1975 ****
  21. --- 1970,1980 ----
  22.       retval = rename(TempFile, NewFile);
  23.       close(fd);
  24.       mch_remove((char_u *)OldFile);
  25. +     /* If renaming to NewFile failed, rename TempFile back to OldFile, so
  26. +      * that it looks like nothing happened. */
  27. +     if (retval)
  28. +         rename(TempFile, OldFile);
  29.       }
  30.       vim_free(TempFile);
  31.   
  32. *** ../vim-5.5.59/src/os_win32.c    Wed Sep 22 10:06:28 1999
  33. --- src/os_win32.c    Tue Dec  7 10:38:47 1999
  34. ***************
  35. *** 3835,3841 ****
  36. --- 3835,3847 ----
  37.   
  38.       /* rename the temp file to the new file */
  39.       if (!MoveFile(szTempFile, pszNewFile))
  40. +     {
  41. +     /* Renaming failed.  Rename the file back to its old name, so that it
  42. +      * looks like nothing happened. */
  43. +     (void)MoveFile(szTempFile, pszOldFile);
  44.       return -7;
  45. +     }
  46.   
  47.       /* Seems to be left around on Novell filesystems */
  48.       DeleteFile(szTempFile);
  49. *** ../vim-5.5.59/src/version.c    Mon Dec  6 19:42:48 1999
  50. --- src/version.c    Tue Dec  7 10:44:01 1999
  51. ***************
  52. *** 420,420 ****
  53. --- 420,421 ----
  54.   {   /* Add new patch number below this line */
  55. +     60,
  56.  
  57. -- 
  58. ARTHUR: Right! Knights! Forward!
  59.    ARTHUR leads a charge toward the castle.  Various shots of them battling on,
  60.    despite being hit by a variety of farm animals.
  61.                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
  62.  
  63. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
  64.   \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /
  65.