Re: g_rename() problem on Windows (and suggested remedy)
From: John Emmas <johne53 tiscali co uk>
To: gtk-devel-list gnome org
Subject: Re: g_rename() problem on Windows (and suggested remedy)
Date: Mon, 26 Mar 2012 19:26:28 +0100
On 26 Mar 2012, at 18:44, John Emmas wrote:
On 26 Mar 2012, at 17:53, Stef Walter wrote:
Reaching back into my memory of windows development past here ... but won't reading/writing to such a windows file handle after a rename/delete return an error?
Hi Stef - I've only tried writing to a renamed file, which does work (with my modified creation strategy). Haven't tried writing to a deleted file but I could easily test it.
I just tried it Stef,
DeleteFile() and remove() both fail if the file has any handles still open. So the only relevant cases are rename() and MoveFile() - and of course g_rename() - all of which now work.