From 09da6cb8af2a13078cd7611d754ffacebbbf36d3 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Thu, 31 May 2012 14:01:36 -0700 Subject: [PATCH] Always use filename as the notebook name. --- IPython/frontend/html/notebook/notebookmanager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IPython/frontend/html/notebook/notebookmanager.py b/IPython/frontend/html/notebook/notebookmanager.py index a4f859b22..6dea1b275 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'):