[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-devel
Subject:    Re: Make g_rename() replace existing files on Win32?
From:       "J. Ali Harlow" <ali () juiblex ! co ! uk>
Date:       2005-11-30 10:00:14
Message-ID: 1133344814l.15043l.17l () percy ! juiblex ! co ! uk
[Download RAW message or body]

On 30/11/05 00:54:22, Tor Lillqvist wrote:
> The rename() function in the Microsoft C library calls the Win32 API
> MoveFile(), which does not replace existing files.
> 
> I now notice there is also a function MoveFileEx(), to which one can
> specify the flag MOVEFILE_REPLACE_EXISTING, which enables atomic
> replacement of an existing file. Sigh, why didn't I notice that
> earlier...
> 
> What do you think, should g_rename() be changed to use MoveFileEx()
> instead of rename() on NT-based Windowses? My vote is yes.

And mine too. The advantages outweigh the tiny API breakage.

Cheers,

Ali.
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic