Announce mkdir in VERBOSE
This commit is contained in:
@@ -110,7 +110,10 @@ static int fopen_and_mkdir(const char *dir)
|
|||||||
tmp[len - 1] = 0;
|
tmp[len - 1] = 0;
|
||||||
for (p = tmp + 1; *p; p++)
|
for (p = tmp + 1; *p; p++)
|
||||||
if (*p == '/') {
|
if (*p == '/') {
|
||||||
|
struct stat st = {0};
|
||||||
*p = 0;
|
*p = 0;
|
||||||
|
if (stat(tmp, &st) == -1)
|
||||||
|
log(VERBOSE, "Directory \"%s\" doesn't exist. Creating...", tmp);
|
||||||
if (mkdir(tmp, 0700) == -1 && errno != EEXIST) {
|
if (mkdir(tmp, 0700) == -1 && errno != EEXIST) {
|
||||||
log(ERROR,
|
log(ERROR,
|
||||||
"Permission denied to create directory: %s",
|
"Permission denied to create directory: %s",
|
||||||
|
|||||||
Reference in New Issue
Block a user