diff libpurple/protocols/silc/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/silc/buddy.c	Sat Oct 27 13:12:27 2007 +0000
+++ b/libpurple/protocols/silc/buddy.c	Sat Oct 27 13:23:01 2007 +0000
@@ -934,8 +934,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;
+					}
 			}
 		}