From 2103432780c35b4a256452f0d815bfe0bfc41cd8 Mon Sep 17 00:00:00 2001 From: Kasra Bigdeli Date: Mon, 25 Feb 2019 23:10:29 -0800 Subject: [PATCH] Added more comments --- src/routes/system/SystemRouter.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/routes/system/SystemRouter.ts b/src/routes/system/SystemRouter.ts index cd069f5..b1bcf8f 100644 --- a/src/routes/system/SystemRouter.ts +++ b/src/routes/system/SystemRouter.ts @@ -25,6 +25,14 @@ router.post('/createbackup/', function(req, res, next) { }) .then(function(pathOfBackup) { res.download(pathOfBackup, function(err) { + if (err) { + Logger.e(err) + } + + Logger.d( + `Downloading backup finished: ${pathOfBackup} Removing directory...` + ) + backupManager.deleteBackupDirectoryIfExists() }) })