/pidgin/main: 20173b979145: s/unlink/g_unlink/ and log a message...

Mark Doliner mark at kingant.net
Sat Dec 29 02:10:47 EST 2012


Changeset: 20173b9791455052706f0f20f2a8dfd3c0450b47
Author:	 Mark Doliner <mark at kingant.net>
Date:	 2012-12-28 23:09 -0800
Branch:	 default
URL: http://hg.pidgin.im/pidgin/main/rev/20173b979145

Description:

s/unlink/g_unlink/ and log a message if the call fails.

diffstat:

 libpurple/log.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (15 lines):

diff --git a/libpurple/log.c b/libpurple/log.c
--- a/libpurple/log.c
+++ b/libpurple/log.c
@@ -835,7 +835,10 @@ convert_image_tags(const PurpleLog *log,
 						fclose(image_file);
 
 						/* Attempt to not leave half-written files around. */
-						unlink(path);
+						if (g_unlink(path)) {
+							purple_debug_error("log", "Error deleting partial "
+									"file %s: %s\n", path, g_strerror(errno));
+						}
 					}
 					else
 					{



More information about the Commits mailing list