From fcaea3e1bbdd2cde35e8109da31388ed76b1c4bc Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Thu, 15 Feb 2018 17:47:23 +0000 Subject: [PATCH] Replace backslash in image path for Windows --- gramps/gen/plug/docgen/treedoc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gramps/gen/plug/docgen/treedoc.py b/gramps/gen/plug/docgen/treedoc.py index e3b4f3b17..7d78274f0 100644 --- a/gramps/gen/plug/docgen/treedoc.py +++ b/gramps/gen/plug/docgen/treedoc.py @@ -459,6 +459,8 @@ class TreeDocBase(BaseDoc, TreeDoc): media = db.get_media_from_handle(mediaref.ref) path = media_path_full(db, media.get_path()) if os.path.isfile(path): + if win(): + path = path.replace('\\', '/') self.write(level+1, 'image = {%s},\n' % path) break # first image only self.write(level, '}\n')