Skip to content

Commit c17a772

Browse files
committed
use cross-platform path separator
1 parent 187298c commit c17a772

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/fetch-algorithms.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,10 +550,10 @@ const categoriesToSkip = ["main", "src", "algorithms", "problems"];
550550
function isValidCategory(name: string) {
551551
if (normalize(name).match(/problem\d+/)) return false;
552552
for (const exclude of categoriesToIgnore)
553-
for (const category of name.split("/"))
553+
for (const category of name.split(path.sep))
554554
if (normalize(category) === normalize(exclude)) return false;
555555
for (const exclude of ["__init__", "mod.rs"])
556-
for (const category of name.split("/"))
556+
for (const category of name.split(path.sep))
557557
if (category === exclude) return false;
558558
return true;
559559
}

0 commit comments

Comments
 (0)