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) self.action_table_of_contents.setChecked(False)
if isbytestring(pathtoebook): if isbytestring(pathtoebook):
pathtoebook = force_unicode(pathtoebook, filesystem_encoding) pathtoebook = force_unicode(pathtoebook, filesystem_encoding)
pathtoebook = os.path.abspath(pathtoebook)
vh = vprefs.get('viewer_open_history', []) vh = vprefs.get('viewer_open_history', [])
try: try:
vh.remove(pathtoebook) vh.remove(pathtoebook)
except: except:
pass pass
vh.insert(0, os.path.abspath(pathtoebook)) vh.insert(0, pathtoebook)
vprefs.set('viewer_open_history', vh[:50]) vprefs.set('viewer_open_history', vh[:50])
self.build_recent_menu() self.build_recent_menu()
self.view.set_book_data(self.iterator) self.view.set_book_data(self.iterator)