From 0172359b97d990c1eacb3a9a0003c7142ba0b520 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 9 Nov 2008 08:35:12 +0900 Subject: [PATCH] Fail more gracefully when the file specified on the command line is neither system nor portable file. --- src/ui/gui/psppire.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ui/gui/psppire.c b/src/ui/gui/psppire.c index b1551fbb..d36a802c 100644 --- a/src/ui/gui/psppire.c +++ b/src/ui/gui/psppire.c @@ -263,7 +263,13 @@ parse_non_options (int key, char *arg, struct argp_state *state) if (pfm_detect (fp)) { ds_init_cstr (&syntax, "IMPORT FILE="); + goto close; } + + fclose (fp); + msg (ME, _("%s is neither a system nor portable file"), arg); + break; + close: fclose (fp); -- 2.30.2