summaryrefslogtreecommitdiff
path: root/src/database.c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-01-16 07:07:15 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-01-16 07:07:15 +0000
commitfed45e4b7ffe02dd706f51301812bbd9f509229e (patch)
tree10da63695df06127161dee92e17a4fb93c91ff5b /src/database.c
parent6674b13cd4eb7a514200fdd03e45a388b3723620 (diff)
downloadapk-tools-fed45e4b7ffe02dd706f51301812bbd9f509229e.tar.gz
apk-tools-fed45e4b7ffe02dd706f51301812bbd9f509229e.tar.bz2
apk-tools-fed45e4b7ffe02dd706f51301812bbd9f509229e.tar.xz
apk-tools-fed45e4b7ffe02dd706f51301812bbd9f509229e.zip
db: try create root in case it does not exist
But we dont bother try create all subdirs (i.e mkdir -p ...)
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/database.c b/src/database.c
index 99ccaac..46bf9f8 100644
--- a/src/database.c
+++ b/src/database.c
@@ -556,6 +556,7 @@ int apk_db_create(const char *root)
int fd;
fchdir(apk_cwd_fd);
+ mkdir(root, 0755);
if (chdir(root) == -1)
return -errno;