mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-10-29 07:15:01 -04:00
add forgotten err object check for fs.unlink (#6972)
This commit is contained in:
parent
b0b0f0c23a
commit
f4b17909fd
2
db.js
2
db.js
@ -3661,7 +3661,7 @@ module.exports.CreateDB = function (parent, func) {
|
||||
let mesg = 'Zipbackup failed (' + obj.backupStatus.toString(2).slice(-8) + '), deleting incomplete backup: ' + obj.newAutoBackupFile;
|
||||
if (func) { func(mesg) }
|
||||
else { parent.addServerWarning(mesg, true ) };
|
||||
if (fs.existsSync(obj.newAutoBackupFile)) { fs.unlink(obj.newAutoBackupFile, function (err) { console.error('Failed to clean up backupfile: ' + err.message) }) };
|
||||
if (fs.existsSync(obj.newAutoBackupFile)) { fs.unlink(obj.newAutoBackupFile, function (err) { if (err) {console.error('Failed to clean up backupfile: ' + err.message)} }) };
|
||||
};
|
||||
if (obj.databaseType != DB_NEDB) {
|
||||
//remove dump archive file, because zipped and otherwise fills up
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user