diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2012-03-02 16:56:55 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-03-02 16:56:55 (GMT) |
commit | 1c1a9197eb3dda5ce65d9da8ae77a5e10dd26a93 (patch) | |
tree | edb786af9c5090528a712878c05f509e3c2aa3fc /epubview | |
parent | 503f2a90c6b8ac5d1c45f39c348bf4938a89168e (diff) |
Do not create the symbolic link if already exist
We use a symbolic link from the xml file to a xhtml file
because webkit is confused with the extension.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'epubview')
-rw-r--r-- | epubview/epubview.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/epubview/epubview.py b/epubview/epubview.py index 8db93df..6df4830 100644 --- a/epubview/epubview.py +++ b/epubview/epubview.py @@ -593,7 +593,8 @@ class _View(Gtk.HBox): if filename.endswith('xml'): dest = filename.replace('xml', 'xhtml') - os.symlink(filename, dest) + if not os.path.exists(dest): + os.symlink(filename, dest) self._view.load_uri('file://' + dest) else: self._view.load_uri('file://' + filename) |