# HG changeset patch # User Sam # Date 1685005078 -25200 # Node ID 5752102b1eb763a81b3df1c300eaa600b03a67bb # Parent 96976d3d5364e42a4614fd8f6b748ba78c8358f4 fix: wrong path-checking diff -r 96976d3d5364 -r 5752102b1eb7 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):