From e05d2c871beb4ca5cda1298ed926f197b0478edd Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Fri, 27 Dec 2013 07:34:25 -0800 Subject: [PATCH] Don't open recent files on startup that don't exist anymore Former-commit-id: 89b6735e89907aedda9017b4d888a79daefe3915 --- yomi_base/reader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yomi_base/reader.py b/yomi_base/reader.py index 8d3a1b4..5605112 100644 --- a/yomi_base/reader.py +++ b/yomi_base/reader.py @@ -65,7 +65,7 @@ class MainWindowReader(QtGui.QMainWindow, gen.reader_ui.Ui_MainWindowReader): self.openFile(filename) elif self.preferences['loadRecentFile']: filenames = self.preferences.recentFiles() - if len(filenames) > 0: + if len(filenames) > 0 and os.path.isfile(filenames[0]): self.openFile(filenames[0]) self.actionAbout.triggered.connect(self.onActionAbout)