From ab6141876ad0a789aae362505d060f013ae868f5 Mon Sep 17 00:00:00 2001 From: Ben <36240171+benkyd@users.noreply.github.com> Date: Fri, 29 Apr 2022 19:16:55 +0100 Subject: [PATCH] ffs Former-commit-id: 885f94713edf309efe02061aa16d1580840477cc --- src/routes/cdn.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/cdn.js b/src/routes/cdn.js index 46342cb..1ef72b4 100644 --- a/src/routes/cdn.js +++ b/src/routes/cdn.js @@ -21,7 +21,7 @@ function Get(req, res) { // if linux const defaultFile = `${process.cwd()}\\db\\img\\default.png`; - if (process.platform === 'linux') { + if (process.platform !== 'win32') { defaultFile.replace(/\\/g, '/'); } @@ -33,7 +33,7 @@ function Get(req, res) { // if linux const file = `${process.cwd()}\\db\\img\\${bucket[0]}\\${bucket[1]}\\${bucket[2]}\\${bucket[3]}\\${id}`; - if (process.platform === 'linux') { + if (process.platform !== 'win32') { file.replace(/\\/g, '/'); }