Skip to content

Commit 313f01d

Browse files
committed
gen_descriptor: compress() forward-slash source globs on windows
compress() keyed dirs by str(p.parent) -> backslashes on windows Path -> mixed '3rdparty\libjpeg-turbo\simd/jsimd.c' source globs (invalid lua escape, wrong glob separators). Use p.parent.as_posix(). Descriptor otherwise generated fully (2845 lines, mcpp parse OK: windows sources 45/inc 22/gen 174).
1 parent b463b42 commit 313f01d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/compat-opencv/gen_descriptor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,10 @@ def compress(entries):
292292
for e in entries:
293293
if e.startswith("*/"):
294294
p = Path(e[2:])
295-
by_dir[("*", str(p.parent), p.suffix)].append(p.name)
295+
by_dir[("*", p.parent.as_posix(), p.suffix)].append(p.name) # as_posix: forward slashes on windows
296296
else: # mcpp_generated/...
297297
p = Path(e)
298-
by_dir[("g", str(p.parent), p.suffix)].append(p.name)
298+
by_dir[("g", p.parent.as_posix(), p.suffix)].append(p.name)
299299
out = []
300300
for (kind, d, suf), names in sorted(by_dir.items()):
301301
if kind == "*":

0 commit comments

Comments
 (0)