Merge pull request #1127 from minrk/read-only-download

Don't force save before download if notebook isn't writable
This commit is contained in:
Jonathan Frederic 2016-02-23 16:50:24 -08:00
commit 4b8f19e5e7

View File

@ -79,7 +79,7 @@ define([
) + "?download=" + download.toString();
var w = window.open('', IPython._target);
if (this.notebook.dirty) {
if (this.notebook.dirty && this.notebook.writable) {
this.notebook.save_notebook().then(function() {
w.location = url;
});
@ -122,7 +122,7 @@ define([
var url = utils.url_path_join(
base_url, 'files', notebook_path
) + '?download=1';
if (that.notebook.dirty) {
if (that.notebook.dirty && that.notebook.writable) {
that.notebook.save_notebook().then(function() {
w.location = url;
});