4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: When trying to rename a file and it doesn't exist, the destination
12 file is deleted anyway. (Luc Deux)
13 Solution: Don't delete the destination when the source doesn't exist. (Taro
18 *** ../vim-6.2.285/src/fileio.c Fri Jan 30 21:03:16 2004
19 --- src/fileio.c Sat Feb 21 12:09:01 2004
29 * When the names are identical, there is nothing to do.
35 ! * First delete the "to" file, this is required on some systems to make
36 ! * the mch_rename() work, on other systems it makes sure that we don't
37 ! * have two files when the mch_rename() fails.
45 ! * Fail if the "from" file doesn't exist. Avoids that "to" is deleted.
47 ! if (mch_stat((char *)from, &st) < 0)
51 ! * Delete the "to" file, this is required on some systems to make the
52 ! * mch_rename() work, on other systems it makes sure that we don't have
53 ! * two files when the mch_rename() fails.
57 *** ../vim-6.2.285/src/version.c Fri Feb 20 22:14:29 2004
58 --- src/version.c Tue Feb 24 15:17:27 2004
62 { /* Add new patch number below this line */
68 "The amigos also appear to be guilty of not citing the work of others who had
69 gone before them. Even worse, they have a chapter about modeling time and
70 space without making a single reference to Star Trek!"
71 (Scott Ambler, reviewing the UML User Guide)
73 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
74 /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
75 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
76 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///