Tony Mechelynck wrote:

> On 30/12/08 16:16, Bram Moolenaar wrote:
> >
> > Patch 7.2.076
> > Problem:    rename(from, to) deletes the file if "from" and "to" are not 
> > equal
> >         but still refer to the same file.  E.g., on a FAT32 filesystem
> >         under Unix.
> > Solution:   Go through another file name.
> > Files:          src/fileio.c
> [...]
> 
> Compiles OK, but:
> fileio.c: In function ‘vim_rename’:
> fileio.c:6141: warning: pointer targets in passing argument 1 of 
> ‘gettail’ differ in signedness
> fileio.c:6141: warning: pointer targets in passing argument 1 of 
> ‘sprintf’ differ in signedness

I quickly fixed the serious problem that a file could be deleted when
renaming it.  I'm now also fixing that rename("foo", "FOO") doesn't work
on systems where the file name case is kept but ignored when finding a
file.  I'll also fix the warnings.

-- 
The most powerful force in the universe is gossip.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui