Mercurial > games > semicongine
changeset 900:f14b955da09b
fix: yielding duplicates
author | Sam <sam@basx.dev> |
---|---|
date | Wed, 14 Feb 2024 23:15:53 +0700 |
parents | ad961543994b |
children | 7f430850e587 |
files | semicongine/resources.nim tests/resources/mod1/aSubdir/moreSubdir/superSubdir/empty.stuff |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/semicongine/resources.nim Wed Feb 14 21:58:43 2024 +0700 +++ b/semicongine/resources.nim Wed Feb 14 23:15:53 2024 +0700 @@ -112,6 +112,7 @@ else: if not (components[0] in yielded): yield (kind: pcDir, path: components[0]) + yielded.incl components[0] archive.close() elif thebundletype == Exe: @@ -157,6 +158,7 @@ else: if not (components[0] in yielded): yield (kind: pcDir, path: components[0]) + yielded.incl components[0] proc loadResource*(path: string, package = DEFAULT_PACKAGE): Stream = loadResource_intern(path, package = package)