Backport PR #1127: Don't force save before download if notebook isn't writable

closes #1112
pull/1326/head
Min RK 10 years ago
parent fd765a4e8d
commit 8120459e4e

@ -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;
});

Loading…
Cancel
Save