const express = require("express");
const FileManager = require("../server-classes/file-manager");

const router = express.Router();

router.get("/", (req, res) => {
	if (!FileManager.currentFileExists() && !FileManager.backupFileExists()) {
		res.sendFile("views/maintenance.html");
		return;
	}
	res.sendFile("views/index.html");
});

router.get("/noMaintenance", (req, res) => {
	res.sendFile("views/index.html");
});

module.exports = router;

@@ -30,16 +30,47 @@
 ess%22);%0D%0A
+const path = require('path');%0D%0A
 const Fi
@@ -284,25 +284,49 @@
 es.sendFile(
-%22
+path.join(__dirname, %22../
 views/mainte
@@ -337,16 +337,17 @@
 e.html%22)
+)
 ;%0D%0A%09%09ret
@@ -362,33 +362,57 @@
 %0D%0A%09res.sendFile(
-%22
+path.join(__dirname, %22../
 views/index.html
@@ -405,32 +405,33 @@
 ews/index.html%22)
+)
 ;%0D%0A%7D);%0D%0A%0D%0Arouter
@@ -484,17 +484,41 @@
 endFile(
-%22
+path.join(__dirname, %22../
 views/in
@@ -527,16 +527,17 @@
 x.html%22)
+)
 ;%0D%0A%7D);%0D%0A

Fix issue with sendFile.