From 93c2be97582a248fee945225e859f98dae2b63e7 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Thu, 9 Apr 2015 10:06:11 +0100 Subject: Always use forward slashes in ZIP paths --- mammoth/docx/document_xml.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mammoth/docx/document_xml.py') diff --git a/mammoth/docx/document_xml.py b/mammoth/docx/document_xml.py index 8bfdd6f..9477ab5 100644 --- a/mammoth/docx/document_xml.py +++ b/mammoth/docx/document_xml.py @@ -1,4 +1,3 @@ -import os import contextlib from .. import documents @@ -220,7 +219,7 @@ def _create_reader(numbering, content_types, relationships, styles, note_element def _read_blip(element, alt_text): relationship_id = element.attributes["r:embed"] - image_path = os.path.join("word", relationships[relationship_id].target) + image_path = "word/" + relationships[relationship_id].target.lstrip("/") content_type = content_types.find_content_type(image_path) def open_image(): -- cgit v1.2.3