Fixed patoolib.util:stripext handling of compressed tar files

This commit is contained in:
Benjamin Winger 2021-01-25 09:25:43 -05:00
parent 0ae7b3ae53
commit b576de0ef9
No known key found for this signature in database
GPG Key ID: 22E22BE7466677FC
1 changed files with 4 additions and 1 deletions

View File

@ -493,7 +493,10 @@ def shell_quote_nt (value):
def stripext (filename):
"""Return the basename without extension of given filename."""
return os.path.splitext(os.path.basename(filename))[0]
basename, _ = os.path.splitext(os.path.basename(filename))
if basename.endswith(".tar"):
basename, _ = os.path.splitext(basename)
return basename
def get_single_outfile (directory, archive, extension=""):