Display a message when pinPads returns an error
This commit is contained in:
@@ -575,7 +575,10 @@ define([
|
||||
atime: +new Date(),
|
||||
ctime: +new Date()
|
||||
}, function (err) {
|
||||
if (err) { return void cb(err); }
|
||||
if (err) {
|
||||
logError(err);
|
||||
return void cb(err);
|
||||
}
|
||||
parentEl[fileName] = href;
|
||||
var newPath = filePath.slice();
|
||||
newPath.push(fileName);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user