Replace backslash in image path for Windows

This commit is contained in:
Nick Hall committed 2018-02-16 19:33:46 +00:00
1 parent fc99f12568
commit fcaea3e1bb
1 file changed
+2
+2
View File
@@ -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')