Fail more gracefully when the file specified on the command line is
[pspp-builds.git] / src / ui / gui / psppire.c
index b1551fbb15f137f81cc548cc48f3f49a80f70fb3..d36a802cb0e828a9a9d7c46c81aa312d8e5958d2 100644 (file)
@@ -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);