From dc8ec0a964039b42cc97bd46898e398eb05723fc Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Fri, 30 Jun 2017 15:24:24 +0200 Subject: [PATCH] Narrated Web: path to alternate image is wrong Fixes #9881 --- gramps/plugins/webreport/narrativeweb.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/gramps/plugins/webreport/narrativeweb.py b/gramps/plugins/webreport/narrativeweb.py index 6ccaf025f..5fd8ed36b 100644 --- a/gramps/plugins/webreport/narrativeweb.py +++ b/gramps/plugins/webreport/narrativeweb.py @@ -2650,20 +2650,15 @@ class BasePage: mime_type = media.get_mime_type() if mime_type: if mime_type.startswith("image/"): - real_path, newpath = \ + real_path, new_path = \ self.report.prepare_copy_media( media) newpath = self.report.build_url_fname( - newpath, uplink=self.uplink) - dest_dir = os.path.dirname( - self.report.cur_fname) - if dest_dir: - newpath = os.path.join(dest_dir, - newpath) + new_path, uplink=self.uplink) self.report.copy_file( media_path_full(self.r_db, media.get_path()), - newpath) + new_path) tmp += Html("li", self.media_link(