From 155a03a92f2d40c037042db690687ba5b33cc99b Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Thu, 21 Apr 2016 08:41:35 +0200 Subject: [PATCH] 9377: Narrated web report link to thumbnails is broken on certain pages --- gramps/plugins/webreport/narrativeweb.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gramps/plugins/webreport/narrativeweb.py b/gramps/plugins/webreport/narrativeweb.py index ab668299d..61f862274 100644 --- a/gramps/plugins/webreport/narrativeweb.py +++ b/gramps/plugins/webreport/narrativeweb.py @@ -2402,9 +2402,12 @@ class BasePage(object): if mime_type: if mime_type.startswith("image/"): real_path, newpath = self.report.prepare_copy_media(media) - newpath = self.report.build_url_fname(newpath) + newpath = self.report.build_url_fname(newpath, up=self.up) + dest_dir = os.path.dirname(self.report.cur_fname) + if dest_dir: + copypath = os.path.join(dest_dir, newpath) self.report.copy_file(media_path_full( - self.report.database, media.get_path()), newpath) + self.report.database, media.get_path()), copypath) tmp += Html("li", self.media_link(media_handle, newpath, media.get_description(),