From 4e83f43a6c4b0d32b4c3945c42b91bf44a7f4858 Mon Sep 17 00:00:00 2001 From: Kees Bakker Date: Mon, 9 Feb 2009 18:58:23 +0000 Subject: [PATCH] Correct a problem with thumbnails for PDFs. Not tested because I don't a proper testing database for this. http://www.gramps-project.org/bugs/view.php?id=2433 * src/plugins/webreport/NarrativeWeb.py svn: r11941 --- src/plugins/webreport/NarrativeWeb.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index b808f9eb7..8e029a734 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -1344,7 +1344,9 @@ class MediaPage(BasePage): thmb_path, 320): try: path = self.report.build_path('preview', photo.handle) - self.report.copy_file(thmb_path, os.path.join(path, photo.handle) + '.png') + npath = os.path.join(path, photo.handle) + '.png' + self.report.copy_file(thmb_path, npath) + path = npath os.unlink(thmb_path) except IOError: path = os.path.join('images', 'document.png')