jupyter-js-filebrowser
Advanced tools
Comparing version 0.4.7 to 0.4.8
@@ -208,2 +208,5 @@ // Copyright (c) Jupyter Development Team. | ||
promises.push(this._model.rename(original, newPath).catch(function (error) { | ||
if (error.xhr) { | ||
error.message = error.xhr.status + ": error.statusText"; | ||
} | ||
if (error.message.indexOf('409') !== -1) { | ||
@@ -218,3 +221,5 @@ var options = { | ||
return _this._model.delete(newPath).then(function () { | ||
return _this._model.rename(original, newPath); | ||
return _this._model.rename(original, newPath).then(function () { | ||
return _this._model.refresh(); | ||
}); | ||
}); | ||
@@ -221,0 +226,0 @@ } |
@@ -837,2 +837,5 @@ // Copyright (c) Jupyter Development Team. | ||
return _this._model.rename(original, newPath).catch(function (error) { | ||
if (error.xhr) { | ||
error.message = error.xhr.status + ": error.statusText"; | ||
} | ||
if (error.message.indexOf('409') !== -1 || | ||
@@ -845,6 +848,8 @@ error.message.indexOf('already exists') !== -1) { | ||
}; | ||
jupyter_js_domutils_1.showDialog(options).then(function (button) { | ||
return jupyter_js_domutils_1.showDialog(options).then(function (button) { | ||
if (button.text === 'OK') { | ||
return _this._model.delete(newPath).then(function () { | ||
return _this._model.rename(original, newPath); | ||
return _this._model.rename(original, newPath).then(function () { | ||
_this._model.refresh(); | ||
}); | ||
}); | ||
@@ -851,0 +856,0 @@ } |
{ | ||
"name": "jupyter-js-filebrowser", | ||
"version": "0.4.7", | ||
"version": "0.4.8", | ||
"description": "File browser widget for Jupyter", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
114789
3279