Re: g_rename() problem on Windows (and suggested remedy)



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.

John


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]