Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
21024:61a87e02da29 | 21025:77a35a382a73 |
---|---|
937 return; | 937 return; |
938 | 938 |
939 /* Create dir if it doesn't exist */ | 939 /* Create dir if it doesn't exist */ |
940 if ((g_stat(filename, &st)) == -1) { | 940 if ((g_stat(filename, &st)) == -1) { |
941 if (errno == ENOENT) { | 941 if (errno == ENOENT) { |
942 if (pw->pw_uid == geteuid()) | 942 if (pw->pw_uid == geteuid()) { |
943 g_mkdir(filename, 0755); | 943 int ret = g_mkdir(filename, 0755); |
944 if (ret < 0) | |
945 return; | |
946 } | |
944 } | 947 } |
945 } | 948 } |
946 | 949 |
947 /* Save VCard */ | 950 /* Save VCard */ |
948 g_snprintf(filename2, sizeof(filename2) - 1, | 951 g_snprintf(filename2, sizeof(filename2) - 1, |