Display a message when pinPads returns an error

This commit is contained in:
yflory
2017-05-22 10:41:47 +02:00
parent 67a04a16ec
commit 538aec6ef5
4 changed files with 12 additions and 4 deletions

View File

@@ -1397,8 +1397,11 @@ define([
// Handlers
if (isInRoot) {
var onCreated = function (err, info) {
if (err && err === E_OVER_LIMIT) {
return void Cryptpad.alert(Messages.pinLimitDrive, null, true);
if (err) {
if (err === E_OVER_LIMIT) {
return void Cryptpad.alert(Messages.pinLimitDrive, null, true);
}
return void Cryptpad.alert(Messages.fm_error_cantPin);
}
module.newFolder = info.newPath;
refresh();
@@ -2361,7 +2364,7 @@ define([
return void Cryptpad.alert(Messages.pinLimitDrive, null, true);
}
if (err) {
return void console.error("Unable to create the file", err);
return void Cryptpad.alert(Messages.fm_error_cantPin);
}
module.newFolder = info.newPath;
refresh();