diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-04-09 10:06:11 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-04-09 10:07:23 +0100 |
| commit | 93c2be97582a248fee945225e859f98dae2b63e7 (patch) | |
| tree | d428b7f50a1047c0464dcc3a0497016791bb27f6 /mammoth/docx | |
| parent | 1a779cc1f5ee6871d1d133fbc6a40c5910196af5 (diff) | |
Always use forward slashes in ZIP paths
Diffstat (limited to 'mammoth/docx')
| -rw-r--r-- | mammoth/docx/document_xml.py | 3 |
1 files changed, 1 insertions, 2 deletions
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(): |
