diff --git a/ChangeLog b/ChangeLog index 11b649672..7cc97c2a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-01-14 Lutz Müller + + * frontends/command-line/main.c: If the user presses 2 times + -c, abort. + 2002-01-14 Colin Marquardt * libgphoto2_port/po/fr.po: Update from Jérôme (is ISO-8859-1 now). diff --git a/frontends/command-line/main.c b/frontends/command-line/main.c index 98ff2a3b2..ce2dcf2c4 100644 --- a/frontends/command-line/main.c +++ b/frontends/command-line/main.c @@ -1310,20 +1310,27 @@ cli_error_print (char *format, ...) static void signal_exit (int signo) { + /* If we already were told to cancel, abort. */ + if (glob_cancel) { + if (!glob_quiet) + printf (_("\nAborting...\n")); + if (glob_camera) + gp_camera_unref (glob_camera); + if (glob_context) + gp_context_unref (glob_context); + if (!glob_quiet) + printf (_("Aborted.\n")); + exit (EXIT_FAILURE); + } + if (!glob_quiet) - printf(_("\nCancelling...\n")); + printf (_("\nCancelling...\n")); glob_cancel = 1; #if 0 - /* If we've got a camera, unref it */ - if (glob_camera) { - gp_camera_unref (glob_camera); - glob_camera = NULL; - } - - if (strlen(glob_owd)>0) - chdir(glob_owd); + if (strlen (glob_owd) > 0) + chdir (glob_owd); exit (EXIT_SUCCESS); #endif