🚑 Fix crash on restore if tmp folder not exist #28

This commit is contained in:
Sebastien Clement 2020-11-09 13:14:47 +01:00
parent 8632a3d079
commit d888ca7b3d

View File

@ -298,7 +298,7 @@ class WebdavTools {
statusTools.setStatus(status);
logger.info("Downloading backup...");
if (!fs.existsSync("./temp/")) fs.mkdirSync("./temp/");
let tmpFile = `./temp/restore_${moment().format("MMM-DD-YYYY_HH_mm")}.tar`;
let stream = fs.createWriteStream(tmpFile);
let conf = this.getConf();