From 0ee92868d7a25f3ffd11b0a0b5a214a2c2ff8b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikolas=20G=C3=B6rlitz?= Date: Thu, 11 Apr 2024 14:46:34 +0200 Subject: [PATCH] potentially fix log dir error --- .docker/entry.sh | 2 +- backend/src/utility/Logger.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.docker/entry.sh b/.docker/entry.sh index f4e34f5..0cf10cb 100644 --- a/.docker/entry.sh +++ b/.docker/entry.sh @@ -3,4 +3,4 @@ nginx # Run Node -cd /opt/backend/src && node Application.js \ No newline at end of file +cd /opt/backend && node src/Application.js \ No newline at end of file diff --git a/backend/src/utility/Logger.ts b/backend/src/utility/Logger.ts index 6a7bf72..3f224fa 100644 --- a/backend/src/utility/Logger.ts +++ b/backend/src/utility/Logger.ts @@ -30,7 +30,7 @@ async function clearLogEntries() { const directory = "log"; fs.readdir(directory, (err, files) => { - if (err) throw err; + if (err) return; for (const file of files) { fs.writeFile(path.resolve(directory, file), "", { flag: "w+" }, err => {