diff options
-rw-r--r-- | sos/utilities.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sos/utilities.py b/sos/utilities.py index 3b254c7c..fa795141 100644 --- a/sos/utilities.py +++ b/sos/utilities.py @@ -224,10 +224,14 @@ class TarFileArchive(Archive): fp = open(src, 'rb') content = fp.read() fp.close() - + fstat = os.stat(src) tar_info = tarfile.TarInfo(name=dest) tar_info.size = len(content) - tar_info.mtime = os.stat(src).st_mtime + tar_info.mtime = fstat.st_mtime + tar_info.pax_headers['atime'] = fstat.st_atime + tar_info.mode = fstat.st_mode + tar_info.uid = fstat.st_uid + tar_info.gid = fstat.st_gid self.tarfile.addfile(tar_info, StringIO(content)) |