Replace backslash in image path for Windows

This commit is contained in:
Nick Hall 2018-02-15 17:47:23 +00:00
parent fc99f12568
commit fcaea3e1bb

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')