From d888ca7b3dd49a32352e0555c0e9badf3fa7b3e0 Mon Sep 17 00:00:00 2001 From: Sebastien Clement Date: Mon, 9 Nov 2020 13:14:47 +0100 Subject: [PATCH] :ambulance: Fix crash on restore if tmp folder not exist #28 --- .../rootfs/opt/nextcloud_backup/tools/webdavTools.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextcloud_backup/rootfs/opt/nextcloud_backup/tools/webdavTools.js b/nextcloud_backup/rootfs/opt/nextcloud_backup/tools/webdavTools.js index c787922..7475666 100644 --- a/nextcloud_backup/rootfs/opt/nextcloud_backup/tools/webdavTools.js +++ b/nextcloud_backup/rootfs/opt/nextcloud_backup/tools/webdavTools.js @@ -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();