Skip to content

Commit abedc35

Browse files
committed
Auto create dir for config output
1 parent 147cece commit abedc35

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ruri.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,6 +1013,8 @@ static void parse_args(int argc, char **_Nonnull argv, struct RURI_CONTAINER *_N
10131013
}
10141014
unlink(output_path);
10151015
remove(output_path);
1016+
ruri_mkdirs(output_path, 0755);
1017+
rmdir(output_path);
10161018
int fd = open(output_path, O_CREAT | O_CLOEXEC | O_RDWR, S_IRUSR | S_IRGRP | S_IROTH | S_IWGRP | S_IWUSR | S_IWOTH);
10171019
if (fd < 0) {
10181020
ruri_error("{red}Error: failed to open output file QwQ\n");

0 commit comments

Comments
 (0)