diff options
| author | Michael Williamson <mike@zwobble.org> | 2017-01-23 20:39:05 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2017-01-23 20:39:05 +0000 |
| commit | e23fe00ff2a8fb3c796bfcc600dcc58dba902fa5 (patch) | |
| tree | bab8590db32f6aa337d9b9fb24ecf329b9a2582e /mammoth/docx/uris.py | |
| parent | a47b5579acd8314d8543d306571dee93ac505667 (diff) | |
Move target URI handling out of zips module
Diffstat (limited to 'mammoth/docx/uris.py')
| -rw-r--r-- | mammoth/docx/uris.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mammoth/docx/uris.py b/mammoth/docx/uris.py new file mode 100644 index 0000000..59f3ffe --- /dev/null +++ b/mammoth/docx/uris.py @@ -0,0 +1,5 @@ +def uri_to_zip_entry_name(base, uri): + if uri.startswith("/"): + return uri[1:] + else: + return base + "/" + uri |
