diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2012-02-06 17:32:55 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-02-06 17:32:55 (GMT) |
commit | d0f7e842492e1e1bf6d756d852c4d678cdb6eaaa (patch) | |
tree | 53f2ebd3ae1281920b32003245fd27a5afd5748e | |
parent | 04c79b3723f0735e4b79ab20fccfc9d63288d86d (diff) |
Fix comparison of file names in epubview._load_page
The code was comparing a file name with a URI, then ever was different
reloading the file from disk.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r-- | epubview/epubview.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epubview/epubview.py b/epubview/epubview.py index c4b3df0..ca5495b 100644 --- a/epubview/epubview.py +++ b/epubview/epubview.py @@ -560,6 +560,7 @@ class _View(gtk.HBox): self._on_page_changed(self._loaded_page, pageno) filename = self._paginator.get_file_for_pageno(pageno) + filename = filename.replace('file://', '') if filename != self._loaded_filename: #self._loaded_filename = filename @@ -575,11 +576,10 @@ class _View(gtk.HBox): if filename.endswith('xml'): dest = filename.replace('xml', 'xhtml') - shutil.copy(filename.replace('file://', ''), - dest.replace('file://', '')) - self._view.open(dest) + shutil.copy(filename, dest) + self._view.open('file://' + dest) else: - self._view.open(filename) + self._view.open('file://' + filename) else: self._scroll_page() |