summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2010-09-23 13:25:18 +0200
committerMarcel Holtmann <marcel@holtmann.org>2010-09-23 21:45:48 +0900
commit357d60c6502ed5219400603f3274369d3a786a57 (patch)
tree4f1362ca0e72d93b23afc8ebde6fe089367a2b06 /src/main.c
parent83781d50e19a29f099009f0a4e07a857e14cb498 (diff)
downloadconnman-357d60c6502ed5219400603f3274369d3a786a57.tar.gz
connman-357d60c6502ed5219400603f3274369d3a786a57.tar.bz2
connman-357d60c6502ed5219400603f3274369d3a786a57.zip
Put .data files into a separate directory
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 28e72ba0..dd7084bf 100644
--- a/src/main.c
+++ b/src/main.c
@@ -172,6 +172,12 @@ int main(int argc, char *argv[])
perror("Failed to create storage directory");
}
+ if (mkdir(STORAGEDIR "/stats", S_IRUSR | S_IWUSR | S_IXUSR |
+ S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) < 0) {
+ if (errno != EEXIST)
+ perror("Failed to create statistics directory");
+ }
+
old_umask = umask(077);
main_loop = g_main_loop_new(NULL, FALSE);