More logic cleanup

This commit is contained in:
Steven Silvester 2017-10-20 05:55:53 -05:00
parent 915146ab3f
commit e95cd6d820

View File

@ -326,8 +326,8 @@ class ContentsManager(LoggingConfigurable):
A filename that is unique, based on the input filename.
"""
# Extract the full suffix from the filename (e.g. .tar.gz)
dirname = os.path.dirname(filename)
basename = os.path.basename(filename)
path = path.strip('/')
dirname, basename = os.path.split(filename)
name, dot, ext = basename.partition('.')
basename = os.path.join(dirname, name)
suffix = dot + ext