Commit 0a2a9155 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

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

2009-03-17  Sven Neumann  <sven@gimp.org>

	* libgimpthumb/gimpthumbnail.c (gimp_thumbnail_save): 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=28175
parent e8699c05
2009-03-17 Sven Neumann <sven@gimp.org>
* libgimpthumb/gimpthumbnail.c (gimp_thumbnail_save): Drop Windows
code to remove target file before renaming. g_rename() nowadays
takes care of allowing replacing existing files on Windows.
2009-03-17 Sven Neumann <sven@gimp.org>
* configure.in: check for fsync().
......
......@@ -886,19 +886,12 @@ gimp_thumbnail_save (GimpThumbnail *thumbnail,
g_printerr ("thumbnail saved to temporary file %s\n", tmpname);
#endif
#ifdef G_OS_WIN32
/* win32 rename can't overwrite */
g_unlink (filename);
#endif
if (g_rename (tmpname, filename) == -1)
{
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
_("Could not create thumbnail for %s: %s"),
thumbnail->image_uri, g_strerror (errno));
success = (g_rename (tmpname, filename) == 0);
success = FALSE;
}
if (! success)
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
_("Could not create thumbnail for %s: %s"),
thumbnail->image_uri, g_strerror (errno));
}
if (success)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment