mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Add symbol files individually to tar file instead of symbol directory
Summary: In the previous attempt, the parent directory was added to the tar file with it being renamed to ".". So it still had a directory and was not a flat tar file. Instead add all files from the symbol path individually. Reviewers: #swift_pilot_client Differential Revision: https://dev.swift-project.org/D86
This commit is contained in:
committed by
Mat Sutcliffe
parent
56aa383a45
commit
64ff167be1
@@ -200,10 +200,13 @@ class Dumper:
|
||||
|
||||
def pack(self, tar_path=None):
|
||||
if tar_path is None:
|
||||
symbol_full_path = os.path.normpath(os.path.join(self.symbol_path, ".."))
|
||||
tar_path = os.path.join(symbol_full_path, 'symbols.tar.gz')
|
||||
tar_path = os.path.normpath(os.path.join(self.symbol_path, ".."))
|
||||
tar_path = os.path.join(tar_path, 'symbols.tar.gz')
|
||||
tar = tarfile.open(tar_path, "w:gz")
|
||||
tar.add(self.symbol_path, arcname='.')
|
||||
for dirname, subdirs, files in os.walk(self.symbol_path):
|
||||
for filename in files:
|
||||
tar.add(os.path.join(dirname, filename), filename)
|
||||
tar.close()
|
||||
|
||||
def process(self, *args):
|
||||
"""Process files recursively in args."""
|
||||
|
||||
Reference in New Issue
Block a user