# HG changeset patch # User Sam # Date 1685005078 -25200 # Node ID 9d98bac0b1d9bf26013cf86c271e63952f532873 # Parent 772d8af8f1261825d8839afdab6101563994fdbf fix: wrong path-checking diff -r 772d8af8f126 -r 9d98bac0b1d9 src/semicongine/resources.nim --- a/src/semicongine/resources.nim Wed May 24 23:31:05 2023 +0700 +++ b/src/semicongine/resources.nim Thu May 25 15:57:58 2023 +0700 @@ -33,9 +33,10 @@ joinPath(resourceRoot(), selectedMod) proc loadResource_intern(path: string): Stream = - if not path.fileExists(): + let realpath = joinPath(modRoot(), path) + if not realpath.fileExists(): raise newException(Exception, &"Resource {path} not found") - newFileStream(joinPath(modRoot(), path), fmRead) + newFileStream(realpath, fmRead) proc modList_intern(): seq[string] = for kind, file in walkDir(resourceRoot(), relative=true):