aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS5
-rw-r--r--mammoth/docx/document_xml.py3
2 files changed, 6 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 5c424d9..6638eae 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+# 0.3.13
+
+* Always use forward slashes in ZIP paths. This should fix image handling on
+ Windows.
+
# 0.3.12
* Make style names case-insensitive in style mappings. This should make style
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():