mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix utils.files.guess_archive_type to recognize the "tbz" extension as well
(also tidy up list of extensions)
This commit is contained in:
parent
bd5b9dd0aa
commit
ba0eaae95e
1 changed files with 3 additions and 1 deletions
|
@ -44,7 +44,9 @@ def guess_archive_type(name):
|
|||
Guess an archive type (tar, zip, or rar) by its file extension
|
||||
'''
|
||||
name = name.lower()
|
||||
for ending in ('tar', 'tar.gz', 'tar.bz2', 'tar.xz', 'tgz', 'tbz2', 'txz',
|
||||
for ending in ('tar', 'tar.gz', 'tgz',
|
||||
'tar.bz2', 'tbz2', 'tbz',
|
||||
'tar.xz', 'txz',
|
||||
'tar.lzma', 'tlz'):
|
||||
if name.endswith('.' + ending):
|
||||
return 'tar'
|
||||
|
|
Loading…
Add table
Reference in a new issue