aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Playle <mike.playle@realvnc.com>2010-07-09 17:02:22 +0100
committerMike Playle <mike.playle@realvnc.com>2010-07-09 17:02:22 +0100
commitd095010b52282f41a483c7780815e0242f1e1629 (patch)
tree5010524d08e16a0f1a9990c85ffdcf9c53a0b421
parent802e057e6e55fc120cb6d344ca5e6a2690cff3f0 (diff)
downloadoprofile-d095010b52282f41a483c7780815e0242f1e1629.tar.gz
The 'mode' parameter to mkdir() is in octal, so it should have a leading 0. Also, directories need their 'x' bits set. Change-Id: I95bdae777ed31a8f99d1eeb4974a9ceb8d85633d
-rw-r--r--opcontrol/opcontrol.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/opcontrol/opcontrol.cpp b/opcontrol/opcontrol.cpp
index 0552c8c..ecf4f10 100644
--- a/opcontrol/opcontrol.cpp
+++ b/opcontrol/opcontrol.cpp
@@ -323,11 +323,11 @@ void setup_session_dir()
close(fd);
}
- if (mkdir(OP_DATA_DIR, 755)) {
+ if (mkdir(OP_DATA_DIR, 0755)) {
fprintf(stderr, "Cannot create directory \"%s\": %s\n",
OP_DATA_DIR, strerror(errno));
}
- if (mkdir(OP_DATA_DIR"/samples", 644)) {
+ if (mkdir(OP_DATA_DIR"/samples", 0755)) {
fprintf(stderr, "Cannot create directory \"%s\": %s\n",
OP_DATA_DIR"/samples", strerror(errno));
}
@@ -339,7 +339,7 @@ int do_setup()
setup_session_dir();
- if (mkdir(OP_DRIVER_BASE, 644)) {
+ if (mkdir(OP_DRIVER_BASE, 0755)) {
fprintf(stderr, "Cannot create directory "OP_DRIVER_BASE": %s\n",
strerror(errno));
return -1;