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