From fd985731f0cdfa53e429d70dd77279b03a306dfb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C3=ABl=20Minelli?= <michael@minelli.me>
Date: Thu, 10 Aug 2023 01:25:03 +0200
Subject: [PATCH] ExerciceRoutes => Bug fix: Replace all ':' of time by '_'

---
 ExpressAPI/src/routes/ExerciceRoutes.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ExpressAPI/src/routes/ExerciceRoutes.ts b/ExpressAPI/src/routes/ExerciceRoutes.ts
index 6a397e6..5fde126 100644
--- a/ExpressAPI/src/routes/ExerciceRoutes.ts
+++ b/ExpressAPI/src/routes/ExerciceRoutes.ts
@@ -218,7 +218,7 @@ class ExerciceRoutes implements RoutesManager {
                                                   }
                                               });
 
-        fs.writeFileSync(path.join(Config.getResultsFolder(exercice), `${ result.dateTime.toISOString().replace(':', '-') }.tar.gz`), params.archiveBase64, 'base64');
+        fs.writeFileSync(path.join(Config.getResultsFolder(exercice), `${ result.dateTime.toISOString().replace(/:/g, '_') }.tar.gz`), params.archiveBase64, 'base64');
 
         req.session.sendResponse(res, StatusCodes.OK);
     }
-- 
GitLab