diff --git a/patoolib/fileutil.py b/patoolib/fileutil.py index 4a7d810a..d9d9b3d2 100644 --- a/patoolib/fileutil.py +++ b/patoolib/fileutil.py @@ -81,7 +81,8 @@ def stripext(filename): """Return the basename without extension of given filename For compressed TAR archives, the filename without the .tar extension is returned, ie. output of 'a.tar.xz' will be - 'a'.""" + 'a'. + """ basename, _ = os.path.splitext(os.path.basename(filename)) if basename.endswith(".tar") and basename != ".tar": basename, _ = os.path.splitext(basename)