Drop Windows code to remove target file before renaming. g_rename()

2009-03-17  Tor Lillqvist  <tml@iki.fi>

	* libgimpconfig/gimpconfigwriter.c
	(gimp_config_writer_close_file): Drop Windows code to remove
	target file before renaming. g_rename() nowadays takes care of
	allowing replacing existing files on Windows.


svn path=/trunk/; revision=28171
This commit is contained in:
Tor Lillqvist 2009-03-17 11:28:29 +00:00 committed by Tor Lillqvist
parent 392a46e16c
commit 244965fd36
2 changed files with 7 additions and 5 deletions

View file

@ -1,3 +1,10 @@
2009-03-17 Tor Lillqvist <tml@iki.fi>
* libgimpconfig/gimpconfigwriter.c
(gimp_config_writer_close_file): Drop Windows code to remove
target file before renaming. g_rename() nowadays takes care of
allowing replacing existing files on Windows.
2009-03-16 Sven Neumann <sven@gimp.org>
* configure.in: bumped GLib version for deprecated symbols.

View file

@ -700,11 +700,6 @@ gimp_config_writer_close_file (GimpConfigWriter *writer,
if (writer->tmpname)
{
#ifdef G_OS_WIN32
/* win32 rename can't overwrite */
g_unlink (writer->filename);
#endif
if (g_rename (writer->tmpname, writer->filename) == -1)
{
g_set_error (error, GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_WRITE,