diff --git a/gramps/plugins/webreport/narrativeweb.py b/gramps/plugins/webreport/narrativeweb.py index 6273f10ee..cb4ac28fa 100644 --- a/gramps/plugins/webreport/narrativeweb.py +++ b/gramps/plugins/webreport/narrativeweb.py @@ -4595,6 +4595,7 @@ class MediaPages(BasePage): os.write(filed, initial_image_data) os.close(filed) self.report.archive.add(dest, initial_image_path) + os.unlink(dest) else: filed = open(os.path.join(self.html_dir, initial_image_path), 'wb') filed.write(initial_image_data)