« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/write/build-modes/live-dev-server.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/write/build-modes/live-dev-server.js b/src/write/build-modes/live-dev-server.js
index f322a79b..a8e54247 100644
--- a/src/write/build-modes/live-dev-server.js
+++ b/src/write/build-modes/live-dev-server.js
@@ -151,7 +151,7 @@ export async function go({
 
     if (localFileArea) {
       // Not security tested, man, this is a dev server!!
-      const safePath = path.resolve('/', localFilePath).replace(/^\//, '');
+      const safePath = path.posix.resolve('/', localFilePath).replace(/^\//, '');
 
       let localDirectory;
       if (localFileArea === 'static' || localFileArea === 'util') {
@@ -160,7 +160,7 @@ export async function go({
         localDirectory = mediaPath;
       }
 
-      const filePath = path.resolve(localDirectory, safePath);
+      const filePath = path.resolve(localDirectory, safePath.split('/').join(path.sep));
 
       try {
         await stat(filePath);