mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
file: yet another fix for directory creation
This commit is contained in:
parent
2a0f745434
commit
4f85e7b82c
1 changed files with 2 additions and 2 deletions
|
@ -218,12 +218,12 @@ int file_start(struct node *n)
|
|||
|
||||
ret = stat(dir, &sb);
|
||||
if (ret) {
|
||||
if (errno == ENOENT && errno == ENOTDIR) {
|
||||
if (errno == ENOENT || errno == ENOTDIR) {
|
||||
ret = mkdir(dir, 0644);
|
||||
if (ret)
|
||||
serror("Failed to create directory");
|
||||
}
|
||||
else
|
||||
else if (errno != EISDIR)
|
||||
serror("Failed to stat");
|
||||
}
|
||||
else if (!S_ISDIR(sb.st_mode)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue