From 99675b0095c42a8430d87e0c8b45605d745b2d8f 2013-10-17 21:09:13 From: MinRK Date: 2013-10-17 21:09:13 Subject: [PATCH] fix `--notebook-dir` configurable when there is no trailing slash --- diff --git a/IPython/html/services/notebooks/nbmanager.py b/IPython/html/services/notebooks/nbmanager.py index 4331b34..ad5a7b1 100644 --- a/IPython/html/services/notebooks/nbmanager.py +++ b/IPython/html/services/notebooks/nbmanager.py @@ -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)