diff libpurple/protocols/silc10/buddy.c @ 21025:77a35a382a73

Add some checking to make sure the directory was created ok before saving silc buddy info
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 27 Oct 2007 13:23:01 +0000
parents 16bdcffb1c62
children 6de09629f091
line wrap: on
line diff
--- a/libpurple/protocols/silc10/buddy.c	Sat Oct 27 13:12:27 2007 +0000
+++ b/libpurple/protocols/silc10/buddy.c	Sat Oct 27 13:23:01 2007 +0000
@@ -939,8 +939,11 @@
 		/* 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;
+				}
 			}
 		}