Skip to content

Commit

Permalink
zipfile fix (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Lee authored Aug 20, 2019
1 parent b1b6c4a commit 3e4cb1b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions splunk_eventgen/eventgen_api_server/eventgen_server_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,7 @@ def unarchive_bundle(self, path):
zipf = zipfile.ZipFile(path)
for info in zipf.infolist():
old_file_name = info.filename
if info.filename.find('/') == len(info.filename) - 1:
info.filename = "eg-bundle/"
else:
info.filename = "eg-bundle/" + info.filename[info.filename.find('/') + 1:]
info.filename = "eg-bundle/" + info.filename
zipf.extract(info, os.path.dirname(path))
output = os.path.join(os.path.dirname(path), 'eg-bundle')
zipf.close()
Expand Down

0 comments on commit 3e4cb1b

Please sign in to comment.