Bug 548988 - g_file_replace fails on Windows when the target file exists
authorTor Lillqvist <tml@novell.com>
Sat, 23 Aug 2008 01:09:08 +0000 (01:09 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Sat, 23 Aug 2008 01:09:08 +0000 (01:09 +0000)
commit02d9af3562e7b16104a8b1078d416d0b7a4ed796
tree867f346c3d3956bb2e61ed4ff5cf66f997b57c68
parent886c0e0d81e5d7e2b1658de59fe9498928f39d72
Bug 548988 - g_file_replace fails on Windows when the target file exists

2008-08-23  Tor Lillqvist  <tml@novell.com>

Bug 548988 - g_file_replace fails on Windows when the target file
exists already

* glocalfileoutputstream.c (g_local_file_output_stream_close): On
Windows, close the file before renaming it (in case we have been
writing to a file with a temporary name).

(g_local_file_output_stream_close, handle_overwrite_open): Use
GLocalFileStat instead of plain struct stat, for passing to
_g_local_file_info_create_etag(). Thus also use _fstati64()
instead of plain fstat() on Windows.

svn path=/trunk/; revision=7388
gio/ChangeLog
gio/glocalfileoutputstream.c