aboutsummaryrefslogtreecommitdiff
path: root/mammoth/zips.py
diff options
context:
space:
mode:
Diffstat (limited to 'mammoth/zips.py')
-rw-r--r--mammoth/zips.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/mammoth/zips.py b/mammoth/zips.py
index cca0b49..79e9b17 100644
--- a/mammoth/zips.py
+++ b/mammoth/zips.py
@@ -65,4 +65,13 @@ def split_path(path):
def join_path(*args):
- return "/".join(list(filter(None, args)))
+ non_empty_paths = list(filter(None, args))
+
+ relevant_paths = []
+ for path in non_empty_paths:
+ if path.startswith("/"):
+ relevant_paths = [path]
+ else:
+ relevant_paths.append(path)
+
+ return "/".join(relevant_paths)