Bugfix: create the directory for storing the restart state (Thanks hjem)

fixes #1303
This commit is contained in:
Michael Stapelberg
2014-06-27 09:04:51 +02:00
parent 653b945376
commit c159fc4197
5 changed files with 93 additions and 5 deletions

View File

@ -41,7 +41,7 @@ static void set_nonblock(int sockfd) {
* Emulates mkdir -p (creates any missing folders)
*
*/
static bool mkdirp(const char *path) {
bool mkdirp(const char *path) {
if (mkdir(path, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) == 0)
return true;
if (errno != ENOENT) {