mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-05-21 17:43:46 -04:00
maybe fix Backuppathtestfile can't be deleted #6965
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
08430a5fa7
commit
918e889b1a
5
db.js
5
db.js
@ -3352,8 +3352,9 @@ module.exports.CreateDB = function (parent, func) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
const testFile = path.join(backupPath, (parent.config.settings.autobackup.backupname + ".test"));
|
||||
|
||||
const currentDate = new Date();
|
||||
const fileSuffix = currentDate.getFullYear() + '-' + padNumber(currentDate.getMonth() + 1, 2) + '-' + padNumber(currentDate.getDate(), 2) + '-' + padNumber(currentDate.getHours(), 2) + '-' + padNumber(currentDate.getMinutes(), 2);
|
||||
const testFile = path.join(backupPath, parent.config.settings.autobackup.backupname + fileSuffix + '.zip');
|
||||
try { fs.writeFileSync( testFile, "DeleteMe"); }
|
||||
catch (e) {
|
||||
//Unable to create file
|
||||
|
Loading…
x
Reference in New Issue
Block a user