mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
file: last fix for dir creation
This commit is contained in:
parent
4f85e7b82c
commit
f7e3e54ccb
1 changed files with 4 additions and 1 deletions
|
@ -214,7 +214,8 @@ int file_start(struct node *n)
|
|||
|
||||
/* Check if directory exists */
|
||||
struct stat sb;
|
||||
char *dir = dirname(f->uri);
|
||||
char *cpy = strdup(f->uri);
|
||||
char *dir = dirname(cpy);
|
||||
|
||||
ret = stat(dir, &sb);
|
||||
if (ret) {
|
||||
|
@ -232,6 +233,8 @@ int file_start(struct node *n)
|
|||
serror("Failed to create directory");
|
||||
}
|
||||
|
||||
free(cpy);
|
||||
|
||||
/* Open file */
|
||||
flags = SAMPLE_HAS_ALL;
|
||||
if (f->flush)
|
||||
|
|
Loading…
Add table
Reference in a new issue