mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
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:
commit
4b8f19e5e7
@ -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…
Reference in New Issue
Block a user