im.pidgin.pidgin: 3a8a65c746e023953f147a9069128a4df23e97bf

nosnilmot at pidgin.im nosnilmot at pidgin.im
Sat Oct 27 10:05:39 EDT 2007


-----------------------------------------------------------------
Revision: 3a8a65c746e023953f147a9069128a4df23e97bf
Ancestor: c3509bf14bc4bd03cc7c631a2329b33df504a825
Author: nosnilmot at pidgin.im
Date: 2007-10-27T13:23:01
Branch: im.pidgin.pidgin

Modified files:
        libpurple/protocols/silc/buddy.c
        libpurple/protocols/silc10/buddy.c

ChangeLog: 

Add some checking to make sure the directory was created ok before saving
silc buddy info

-------------- next part --------------
============================================================
--- libpurple/protocols/silc/buddy.c	b55bff4f2d31c3effaa2f094380c60435656e3f5
+++ libpurple/protocols/silc/buddy.c	64cd6b56d67dab2995b54587f6ecb605fb431a55
@@ -934,8 +934,11 @@ silcpurple_add_buddy_save(SilcBool succe
 		/* Create dir if it doesn't exist */
 		if ((g_stat(filename, &st)) == -1) {
 			if (errno == ENOENT) {
-				if (pw->pw_uid == geteuid())
-					g_mkdir(filename, 0755);
+				if (pw->pw_uid == geteuid()) {
+					int ret = g_mkdir(filename, 0755);
+					if (ret < 0)
+						return;
+					}
 			}
 		}
 
============================================================
--- libpurple/protocols/silc10/buddy.c	f5e9ea03467d941e8315fa19d759d8f94b857ce6
+++ libpurple/protocols/silc10/buddy.c	9efd8b9cc41ff4a4518bd195204a2d6bf9882fa5
@@ -939,8 +939,11 @@ silcpurple_add_buddy_save(bool success, 
 		/* Create dir if it doesn't exist */
 		if ((g_stat(filename, &st)) == -1) {
 			if (errno == ENOENT) {
-				if (pw->pw_uid == geteuid())
-					g_mkdir(filename, 0755);
+				if (pw->pw_uid == geteuid()) {
+					int ret = g_mkdir(filename, 0755);
+					if (ret < 0)
+						return;
+				}
 			}
 		}
 


More information about the Commits mailing list