From 1ea499061e6ba1f1b58939d03dc6b1e881099c36 Mon Sep 17 00:00:00 2001 From: Jake Leahy Date: Tue, 17 Dec 2024 21:56:14 +1100 Subject: [PATCH] Make sure paths are in unix form (e.g. use `/` separator) --- src/mike/public.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mike/public.nim b/src/mike/public.nim index a461e10..6efe040 100644 --- a/src/mike/public.nim +++ b/src/mike/public.nim @@ -13,6 +13,7 @@ import times import std/genasts import std/macros +import std/private/globs import errors @@ -61,7 +62,8 @@ macro servePublic*(folder, path: static[string], renames: openarray[(string, str let files = static: var files = newStringTable() for file in walkDirRec(folder, relative = true): - files[file] = (folder / file).readFile() + let unixPath = nativeToUnixPath(file) + files[unixPath] = (folder / file).readFile() files fullPath -> [get, head]: