[mythtv] [PATCH] setup should warn before clearing the database

Jim Radford mythtv-dev@snowman.net
Mon, 14 Oct 2002 23:46:15 -0700


Hi Isaac,

I re-ran the mythtv setup program just for fun.  I quit out once I
remembered what it did, but it was too late.  It had deleted all of my
program/channel/recording/card info from the database.  I'm not
sure why it needs to do this, but I am sure that it should at
least warn before doing so. :-)

Thanks for all you work on MythTV,
-Jim

Index: main.cpp
===================================================================
RCS file: /var/lib/cvs/MC/setup/main.cpp,v
retrieving revision 1.4
diff -u -r1.4 main.cpp
--- main.cpp	3 Oct 2002 20:06:34 -0000	1.4
+++ main.cpp	15 Oct 2002 06:40:21 -0000
@@ -354,6 +354,9 @@
     if (!dir.exists())
         dir.mkdir(fileprefix);
 
+    if("y" != getResponse("This will clear all program/channel/recording/card info from the database.  Proceed?","y"))
+      exit(1);
+
     clearDB();
 
     getCaptureCards();