diff options
Diffstat (limited to 'mammoth/zips.py')
| -rw-r--r-- | mammoth/zips.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mammoth/zips.py b/mammoth/zips.py index 432be5d..8e09924 100644 --- a/mammoth/zips.py +++ b/mammoth/zips.py @@ -54,3 +54,10 @@ def update_zip(fileobj, files): fileobj.seek(0) destination_fileobj.seek(0) shutil.copyfileobj(destination_fileobj, fileobj) + + +def uri_to_zip_entry_name(base, uri): + if uri.startswith("/"): + return uri[1:] + else: + return base + "/" + uri |
