aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2020-10-26 14:11:56 -0400
committerJake Hunsaker <jhunsake@redhat.com>2020-10-26 14:11:56 -0400
commitc07bdbc94269603d2b910ccafa289512478160aa (patch)
treeae2e8fad7da1af506ce092e194497c6f7c17c21e
parent0c5b4c15f880b1e96ac70ced1de2d7d4f989c19e (diff)
downloadsos-c07bdbc94269603d2b910ccafa289512478160aa.tar.gz
[sos] Fix use of relative paths for --tmp-dir
Fixes an issue where the use of relative paths for `--tmp-dir` causes a failure in the building of the final archive. Previously, a relative path would cause the tarball to be produced in a nested directory under the temp directory of the same name, which would in turn cause compression and all further operations for the archive to fail. Fix this by converting relative paths in the option to the absolute path internally. Resolves: RHBZ#1891562 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/component.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/component.py b/sos/component.py
index 0aef770c..b44fdf82 100644
--- a/sos/component.py
+++ b/sos/component.py
@@ -138,7 +138,7 @@ class SoSComponent():
use a standardized env var to redirect to the host's filesystem instead
"""
if self.opts.tmp_dir:
- return self.opts.tmp_dir
+ return os.path.abspath(self.opts.tmp_dir)
tmpdir = '/var/tmp'