diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2024-04-23 11:00:11 +0200 |
---|---|---|
committer | Jake Hunsaker <jacob.r.hunsaker@gmail.com> | 2024-04-24 15:38:49 -0400 |
commit | a0c2586e230c9600d3d3f70ab89c9f6eb52ed3ed (patch) | |
tree | 2b7ef9dfcc2c7ac16043e2dd8e4a6c49e9e456f5 | |
parent | 08563ef860ff6273ead32f9c7117ddbc915f8cc3 (diff) | |
download | sos-a0c2586e230c9600d3d3f70ab89c9f6eb52ed3ed.tar.gz |
[archive] Fix get_archive_root after files reordering
Commit d5d8c21 reordered files in the archive, such that the first
member is not the archive root directory further more. Let change the
get_archive_root method accordingly to prevent self.archive_root being
empty.
Resolves: #3616
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r-- | sos/cleaner/archives/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/cleaner/archives/__init__.py b/sos/cleaner/archives/__init__.py index f7c5eb58..0fa1ef43 100644 --- a/sos/cleaner/archives/__init__.py +++ b/sos/cleaner/archives/__init__.py @@ -104,7 +104,7 @@ class SoSObfuscationArchive(): if toplevel.isdir(): return toplevel.name else: - return os.sep + return os.path.dirname(toplevel.name) or os.sep return os.path.abspath(self.archive_path) def report_msg(self, msg): |