Permalink
Browse files

Notebook upload handles filenames with periods.

  • Loading branch information...
1 parent 1cfbe5d commit 33e30259c0688240550cbe81e1a9abd3d7c31504 @ellisonbg ellisonbg committed Aug 19, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 IPython/frontend/html/notebook/static/js/notebooklist.js
View
4 IPython/frontend/html/notebook/static/js/notebooklist.js
@@ -37,8 +37,8 @@ var IPython = (function (IPython) {
var reader = new FileReader();
reader.readAsText(f);
var fname = f.name.split('.');
- var nbname = fname[0];
- var nbformat = fname[1];
+ var nbname = fname.slice(0,-1).join('.');
+ var nbformat = fname.slice(-1)[0];
if (nbformat === 'ipynb') {nbformat = 'json';};
if (nbformat === 'py' || nbformat === 'json') {
var item = that.new_notebook_item(0);

0 comments on commit 33e3025

Please sign in to comment.