mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
More logic cleanup
This commit is contained in:
parent
915146ab3f
commit
e95cd6d820
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user