From e8a7bf28e3e7b233e0553d91e02f8cae08f69c37 Mon Sep 17 00:00:00 2001 From: tTh Date: Tue, 12 Nov 2024 22:58:55 +0100 Subject: [PATCH] check for the export directory (fonderie) --- Fonderie/fonderie.c | 13 ++++++++++++- floatimg.h | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Fonderie/fonderie.c b/Fonderie/fonderie.c index 7b43136..bb51660 100644 --- a/Fonderie/fonderie.c +++ b/Fonderie/fonderie.c @@ -10,6 +10,7 @@ #include #include "../floatimg.h" +#include "utilfuncs.h" #include "fifo.h" #include "glitches.h" #include "crapulator.h" @@ -190,6 +191,8 @@ puts("\t-O\toutput directory (default p8/)"); puts("\t-T\tfifo size"); puts("\t-v\tincrease verbosity"); +if (verbosity) { puts(""); fimg_print_version(2); puts(""); } + exit(0); } /* -------------------------------------------------------------- */ @@ -206,7 +209,6 @@ char *OutFchain = "none"; fprintf(stderr, "*** %s\n\tcompiled %s, %s, pid %d\n", argv[0], __DATE__, __TIME__, getpid()); -if (verbosity) fimg_print_version(2); while ((opt = getopt(argc, argv, "B:E:F:ghI:LO:T:vw:x:")) != -1) { switch(opt) { @@ -240,6 +242,15 @@ if (verbosity) { fprintf(stderr, "\tout filter '%s'\n", OutFchain); fprintf(stderr, "\tfifo size %d\n", fifosize); } +/* + * 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) { diff --git a/floatimg.h b/floatimg.h index a4732f2..853a330 100644 --- a/floatimg.h +++ b/floatimg.h @@ -20,7 +20,7 @@ * https://git.tetalab.org/tTh/FloatImg */ -#define FIMG_VERSION (243) +#define FIMG_VERSION (245) #define RELEASE_NAME ("noname") #define PATCH_LEVEL ("aaaa")