]> git.pld-linux.org Git - packages/vim.git/blob - 6.2.286
- removed conflict with 6.2.259
[packages/vim.git] / 6.2.286
1 To: vim-dev@vim.org
2 Subject: Patch 6.2.286
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 6.2.286
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
14             Muraoka)
15 Files:      src/fileio.c
16
17
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
20 ***************
21 *** 5249,5254 ****
22 --- 5249,5255 ----
23   #ifdef AMIGA
24       BPTR      flock;
25   #endif
26 +     struct stat       st;
27   
28       /*
29        * When the names are identical, there is nothing to do.
30 ***************
31 *** 5257,5265 ****
32         return 0;
33   
34       /*
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.
38        */
39   
40   #ifdef AMIGA
41 --- 5258,5272 ----
42         return 0;
43   
44       /*
45 !      * Fail if the "from" file doesn't exist.  Avoids that "to" is deleted.
46 !      */
47 !     if (mch_stat((char *)from, &st) < 0)
48 !       return -1;
49
50 !     /*
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.
54        */
55   
56   #ifdef AMIGA
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
59 ***************
60 *** 639,640 ****
61 --- 639,642 ----
62   {   /* Add new patch number below this line */
63 + /**/
64 +     286,
65   /**/
66
67 -- 
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)
72
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  ///
This page took 0.053918 seconds and 3 git commands to generate.