diff --git a/server.js b/server.js index 55e01c316..a75767a88 100644 --- a/server.js +++ b/server.js @@ -167,7 +167,7 @@ app.use(function (req, res, next) { //Security app.use((req, res, next) => { if (req.url.startsWith('/characters/') && is_colab && process.env.googledrive == 2) { - const filePath = path.join(__dirname, charactersPath, decodeURIComponent(req.url.substr('/characters'.length))); + const filePath = path.join(charactersPath, decodeURIComponent(req.url.substr('/characters'.length))); console.log('req.url: ' + req.url); console.log(filePath); fs.access(filePath, fs.constants.R_OK, (err) => {