From 67ba6386907bfce0d8b87d7d2b09f49735acbcb0 Mon Sep 17 00:00:00 2001 From: tTh Date: Wed, 13 Nov 2024 13:35:22 +0100 Subject: [PATCH] check for the export directory (interpolator) --- Fonderie/interpolator.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Fonderie/interpolator.c b/Fonderie/interpolator.c index 14fd19d..37e65f4 100644 --- a/Fonderie/interpolator.c +++ b/Fonderie/interpolator.c @@ -17,6 +17,7 @@ #include "../floatimg.h" +#include "utilfuncs.h" #include "fifo.h" #include "glitches.h" #include "crapulator.h" @@ -255,6 +256,7 @@ int opt; int sort = 0; char *InFchain = "0"; char *OutFchain = "0"; +char *out_dir = "p8/"; fprintf(stderr, "*** %s\n\tcompiled on %s %s\n", argv[0], __DATE__, __TIME__); @@ -290,6 +292,18 @@ if (3 != (argc-optind)) { exit(1); } +out_dir = argv[optind+1]; + +/* + * check for the export directory + */ +foo = check_if_export_dir_is_valid(out_dir, 0); +if ( !foo ) { + fprintf(stderr, "** export dir (%s) not valid\n", out_dir); + fprintf(stderr, "** may be you have to create it ?\n"); + exit(1); + } + foo = parse_filter_chain(0, InFchain); if (foo) { fprintf(stderr, "err %d parsing '%s'\n", foo, InFchain);