[upstream_utils] Use os path separator when matching path (#6993)

This commit is contained in:
Ryan Blue
2024-08-24 09:52:52 -04:00
committed by GitHub
parent 96bd1e489f
commit 370e63ede6
7 changed files with 15 additions and 11 deletions

View File

@@ -21,13 +21,15 @@ def copy_upstream_src(wpilib_root):
# Copy fmt source files into allwpilib
walk_cwd_and_copy_if(
lambda dp, f: dp.startswith("./src") and f.endswith(".cc") and f != "fmt.cc",
lambda dp, f: dp.startswith(os.path.join(".", "src"))
and f.endswith(".cc")
and f != "fmt.cc",
os.path.join(wpiutil, "src/main/native/thirdparty/fmtlib"),
)
# Copy fmt header files into allwpilib
walk_cwd_and_copy_if(
lambda dp, f: dp.startswith("./include/fmt"),
lambda dp, f: dp.startswith(os.path.join(".", "include", "fmt")),
os.path.join(wpiutil, "src/main/native/thirdparty/fmtlib"),
)