mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-22 09:12:58 +01:00
🚑 Fix crash on restore if tmp folder not exist #28
This commit is contained in:
parent
8632a3d079
commit
d888ca7b3d
@ -298,7 +298,7 @@ class WebdavTools {
|
|||||||
statusTools.setStatus(status);
|
statusTools.setStatus(status);
|
||||||
|
|
||||||
logger.info("Downloading backup...");
|
logger.info("Downloading backup...");
|
||||||
|
if (!fs.existsSync("./temp/")) fs.mkdirSync("./temp/");
|
||||||
let tmpFile = `./temp/restore_${moment().format("MMM-DD-YYYY_HH_mm")}.tar`;
|
let tmpFile = `./temp/restore_${moment().format("MMM-DD-YYYY_HH_mm")}.tar`;
|
||||||
let stream = fs.createWriteStream(tmpFile);
|
let stream = fs.createWriteStream(tmpFile);
|
||||||
let conf = this.getConf();
|
let conf = this.getConf();
|
||||||
|
Loading…
Reference in New Issue
Block a user