mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-18 11:55:46 +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.
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user