# HG changeset patch # User Sam # Date 1707927353 -25200 # Node ID 27c0c60fc7925cce5665a394e62b53fef1393320 # Parent 1ab09f8cc68d1ece524e80830bba07974c4d4940 fix: yielding duplicates diff -r 1ab09f8cc68d -r 27c0c60fc792 semicongine/resources.nim --- 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) diff -r 1ab09f8cc68d -r 27c0c60fc792 tests/resources/mod1/aSubdir/moreSubdir/superSubdir/empty.stuff