From 2ad5095843993b844ae7a20cc9ecd1430c9485a1 Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Fri, 25 Aug 2017 09:02:02 +0200 Subject: [PATCH] Apply changes from 9881 not in refactoring Bug #009881, #010172 --- gramps/plugins/webreport/basepage.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/gramps/plugins/webreport/basepage.py b/gramps/plugins/webreport/basepage.py index 3e6aaccc2..dcc65d283 100644 --- a/gramps/plugins/webreport/basepage.py +++ b/gramps/plugins/webreport/basepage.py @@ -2193,20 +2193,15 @@ class BasePage: # pylint: disable=C1001 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(