Package: debfoster
Version: 2.7-1
Severity: normal
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I was quite a long way through answering questions when I accidentaly
hit 'q', and debfoster exited without confirming. I had to answer all
the questions again :(.

I wrote a patch to ask for confirmation when 'q' is pressed. It works
for me but I'm no C hacker. I just hope similar functionality can be
included in debfoster in future :)

- -- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-vs2.2.0.5.0.7.080414 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_NZ.UTF-8, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages debfoster depends on:
ii  libc6                         2.7-11     GNU C Library: Shared libraries
ii  libgc1c2                      1:6.8-1.1  conservative garbage collector for

Versions of packages debfoster recommends:
ii  apt                           0.7.14     Advanced front-end for dpkg

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFISgLewyV9iOAWYiERAscZAKCxvUN/kti7pvjgkbR5yBPcSHCRjQCfR7Tu
FIFj0zJknixiW82mzhBiEZc=
=8rTQ
-----END PGP SIGNATURE-----
diff --git a/src/debfoster.c b/src/debfoster.c
index c9ecfee..e81cb6a 100644
--- a/src/debfoster.c
+++ b/src/debfoster.c
@@ -924,8 +924,14 @@ int main(int argc, char **argv) {
 						AVLFreeNodes(orphans);
 					break;
 					case 7: /* q */
-						closekeepers();
-						return 0;
+                        switch((i = tty_ask(_("ny"), _("Exit without saving? [yN?]: ")))) {
+                            case 0: /* n */
+                                i = -1;
+                                break;
+                            case 1: /* y */
+                                closekeepers();
+                                return 0;
+                        }
 					case 8: /* x */
 						AVLFreeNodes(orphans);
 					break;

Reply via email to