gimp r28175 - in trunk: . libgimpthumb
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r28175 - in trunk: . libgimpthumb
- Date: Tue, 17 Mar 2009 21:42:37 +0000 (UTC)
Author: neo
Date: Tue Mar 17 21:42:37 2009
New Revision: 28175
URL: http://svn.gnome.org/viewvc/gimp?rev=28175&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/libgimpthumb/gimpthumbnail.c
Modified: trunk/libgimpthumb/gimpthumbnail.c
==============================================================================
--- trunk/libgimpthumb/gimpthumbnail.c (original)
+++ trunk/libgimpthumb/gimpthumbnail.c Tue Mar 17 21:42:37 2009
@@ -886,19 +886,12 @@
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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]