From 024c2f73de2a9d0818003da92c1b348530beb2ca Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Thu, 6 Apr 2023 00:05:16 +0300 Subject: [PATCH] Colab google drive fix (supposed) --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 61ec140aa..85a69a190 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(charactersPath, decodeURIComponent(req.url.substr('/characters'.length))); + const filePath = path.join(__dirname, charactersPath, decodeURIComponent(req.url.substr('/characters'.length))); fs.access(filePath, fs.constants.R_OK, (err) => { if (!err) { res.sendFile(filePath);