##// END OF EJS Templates
fix `--notebook-dir` configurable when there is no trailing slash
MinRK -
Show More
@@ -119,8 +119,7 b' class NotebookManager(LoggingConfigurable):'
119 """Do a bit of validation of the notebook dir."""
119 """Do a bit of validation of the notebook dir."""
120 if not os.path.isabs(new):
120 if not os.path.isabs(new):
121 # If we receive a non-absolute path, make it absolute.
121 # If we receive a non-absolute path, make it absolute.
122 abs_new = os.path.abspath(new)
122 self.notebook_dir = os.path.abspath(new)
123 self.notebook_dir = os.path.dirname(abs_new)
124 return
123 return
125 if os.path.exists(new) and not os.path.isdir(new):
124 if os.path.exists(new) and not os.path.isdir(new):
126 raise TraitError("notebook dir %r is not a directory" % new)
125 raise TraitError("notebook dir %r is not a directory" % new)
General Comments 0
You need to be logged in to leave comments. Login now