I must be unusually distracted today

This commit is contained in:
Kovid Goyal 2017-01-20 09:42:58 +05:30
parent 8b79484d3a
commit 04fb824def

View File

@ -982,12 +982,13 @@ class EbookViewer(MainWindow):
self.action_table_of_contents.setChecked(False)
if isbytestring(pathtoebook):
pathtoebook = force_unicode(pathtoebook, filesystem_encoding)
pathtoebook = os.path.abspath(pathtoebook)
vh = vprefs.get('viewer_open_history', [])
try:
vh.remove(pathtoebook)
except:
pass
vh.insert(0, os.path.abspath(pathtoebook))
vh.insert(0, pathtoebook)
vprefs.set('viewer_open_history', vh[:50])
self.build_recent_menu()
self.view.set_book_data(self.iterator)