Delete the database file if extraction failed to find anything at all.

master
Pacman Ghost 7 years ago
parent 36e0605176
commit df1d5e0289
  1. 4
      startup_widget.py

@ -65,6 +65,10 @@ class AnalyzeThread( QThread ) :
self.completed_signal.emit( "" )
finally :
db.close_database()
if total_cards <= 0 :
# NOTE: If we extracted nothing (e.g. because Ghostscript isn't installed), we delete the database
# so that we don't start up next time with an empty database.
os.unlink( self.db_fname )
def on_error( self , msg ) :
"""Show the user an error message."""

Loading…
Cancel
Save