aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/archive.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sos/archive.py b/sos/archive.py
index ffa54036..903cc672 100644
--- a/sos/archive.py
+++ b/sos/archive.py
@@ -191,7 +191,10 @@ class FileCacheArchive(Archive):
copied now or `None` otherwise
"""
dest = dest or self.dest_path(src)
- dest_dir = os.path.split(dest)[0]
+ if path_type == P_DIR:
+ dest_dir = dest
+ else:
+ dest_dir = os.path.split(dest)[0]
if not dest_dir:
return dest