db: try create root in case it does not exist

But we dont bother try create all subdirs (i.e mkdir -p ...)
cute-signatures
Natanael Copa 2009-01-16 07:07:15 +00:00
parent 6674b13cd4
commit fed45e4b7f
1 changed files with 1 additions and 0 deletions

View File

@ -556,6 +556,7 @@ int apk_db_create(const char *root)
int fd; int fd;
fchdir(apk_cwd_fd); fchdir(apk_cwd_fd);
mkdir(root, 0755);
if (chdir(root) == -1) if (chdir(root) == -1)
return -errno; return -errno;