From 8112e4d32185fa42f48f1dfafd51839e6821a182 2012-05-31 21:01:36 From: Brian Granger <ellisonbg@gmail.com> Date: 2012-05-31 21:01:36 Subject: [PATCH] Always use filename as the notebook name. --- diff --git a/IPython/frontend/html/notebook/notebookmanager.py b/IPython/frontend/html/notebook/notebookmanager.py index a4f859b..6dea1b2 100644 --- a/IPython/frontend/html/notebook/notebookmanager.py +++ b/IPython/frontend/html/notebook/notebookmanager.py @@ -151,8 +151,8 @@ class NotebookManager(LoggingConfigurable): nb = current.reads(s, u'json') except: raise web.HTTPError(500, u'Unreadable JSON notebook.') - if 'name' not in nb: - nb.name = os.path.split(path)[-1].split(u'.')[0] + # Always use the filename as the notebook name. + nb.metadata.name = os.path.split(path)[-1].split(u'.')[0] return last_modified, nb def save_new_notebook(self, data, name=None, format=u'json'):