1
0
Fork 0
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:
Steffen Vogel 2018-10-21 11:09:20 +02:00
parent 4f85e7b82c
commit f7e3e54ccb

View file

@ -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)