From e7a316ba7eae727b54952843cfb0d1775ece5352 Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Tue, 15 Nov 2022 22:47:02 +0100 Subject: [report] Prevent obfuscating tmpDir path also in --build mode Likewise #3065, we should not obfuscate path to directory when --build option is used. Resolves: #3071 Relates: #3065 Signed-off-by: Pavel Moravec --- sos/report/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sos/report/__init__.py b/sos/report/__init__.py index 38cb9012..4098224b 100644 --- a/sos/report/__init__.py +++ b/sos/report/__init__.py @@ -1586,10 +1586,10 @@ class SoSReport(SoSComponent): # move the archive root out of the private tmp directory. directory = self.archive.get_archive_path() dir_name = os.path.basename(directory) + if do_clean: + dir_name = cleaner.obfuscate_string(dir_name) try: final_dir = os.path.join(self.sys_tmp, dir_name) - if do_clean: - final_dir = cleaner.obfuscate_string(final_dir) os.rename(directory, final_dir) directory = final_dir except (OSError, IOError): -- cgit