Skip to content

Commit

Permalink
Make sure paths are in unix form (e.g. use / separator)
Browse files Browse the repository at this point in the history
  • Loading branch information
ire4ever1190 committed Dec 17, 2024
1 parent 46aadbb commit 1ea4990
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mike/public.nim
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import times

import std/genasts
import std/macros
import std/private/globs

import errors

Expand Down Expand Up @@ -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]:
Expand Down

0 comments on commit 1ea4990

Please sign in to comment.