/pidgin/main: 35f10b569e67: MXit: Use G_DIR_SEPARATOR_S as filen...

Andrew Victor andrew.victor at mxit.com
Wed Apr 3 17:26:47 EDT 2013


Changeset: 35f10b569e6736f0536ae9c003776b80f168946e
Author:	 Andrew Victor <andrew.victor at mxit.com>
Date:	 2013-04-03 23:25 +0200
Branch:	 release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/35f10b569e67

Description:

MXit: Use G_DIR_SEPARATOR_S as filename path separator.
(from 3.0.0 tree)

diffstat:

 libpurple/protocols/mxit/splashscreen.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff --git a/libpurple/protocols/mxit/splashscreen.c b/libpurple/protocols/mxit/splashscreen.c
--- a/libpurple/protocols/mxit/splashscreen.c
+++ b/libpurple/protocols/mxit/splashscreen.c
@@ -93,7 +93,7 @@ void splash_remove(struct MXitSession* s
 		purple_debug_info(MXIT_PLUGIN_ID, "Removing splashId: '%s'\n", splashId);
 
 		/* Delete stored splash image */
-		filename = g_strdup_printf("%s/mxit/%s.png", purple_user_dir(), splashId);
+		filename = g_strdup_printf("%s" G_DIR_SEPARATOR_S "mxit" G_DIR_SEPARATOR_S "%s.png", purple_user_dir(), splashId);
 		g_unlink(filename);
 		g_free(filename);
 
@@ -121,7 +121,7 @@ void splash_update(struct MXitSession* s
 	splash_remove(session);
 
 	/* Save the new splash image */
-	dir = g_strdup_printf("%s" G_DIR_SEPARATOR_S "mxit",  purple_user_dir());
+	dir = g_strdup_printf("%s" G_DIR_SEPARATOR_S "mxit", purple_user_dir());
 	purple_build_dir(dir, S_IRUSR | S_IWUSR | S_IXUSR);		/* ensure directory exists */
 
 	filename = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s.png", dir, purple_escape_filename(splashId));
@@ -179,7 +179,7 @@ void splash_display(struct MXitSession* 
 	purple_debug_info(MXIT_PLUGIN_ID, "Display Splash: '%s'\n", splashId);
 
 	/* Load splash-screen image from file */
-	filename = g_strdup_printf("%s/mxit/%s.png", purple_user_dir(), splashId);
+	filename = g_strdup_printf("%s" G_DIR_SEPARATOR_S "mxit" G_DIR_SEPARATOR_S "%s.png", purple_user_dir(), splashId);
 	if (g_file_get_contents(filename, &imgdata, &imglen, NULL)) {
 		char buf[128];
 



More information about the Commits mailing list