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. A filename that is unique, based on the input filename.
""" """
# Extract the full suffix from the filename (e.g. .tar.gz) # Extract the full suffix from the filename (e.g. .tar.gz)
dirname = os.path.dirname(filename) path = path.strip('/')
basename = os.path.basename(filename) dirname, basename = os.path.split(filename)
name, dot, ext = basename.partition('.') name, dot, ext = basename.partition('.')
basename = os.path.join(dirname, name) basename = os.path.join(dirname, name)
suffix = dot + ext suffix = dot + ext