fix --notebook-dir configurable when there is no trailing slash

This commit is contained in:
MinRK 2013-10-07 12:18:08 -07:00
parent cded90efe3
commit e46412e30f

View File

@ -119,8 +119,7 @@ class NotebookManager(LoggingConfigurable):
"""Do a bit of validation of the notebook dir."""
if not os.path.isabs(new):
# If we receive a non-absolute path, make it absolute.
abs_new = os.path.abspath(new)
self.notebook_dir = os.path.dirname(abs_new)
self.notebook_dir = os.path.abspath(new)
return
if os.path.exists(new) and not os.path.isdir(new):
raise TraitError("notebook dir %r is not a directory" % new)