mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
[upstream_utils] Handle edge case in filename matches (#5576)
endswith() leaves files out from subdirectories, which means projects that add new subdirectories won't have those files included when they probably should be.
This commit is contained in:
@@ -35,13 +35,13 @@ def main():
|
||||
|
||||
# Copy fmt source files into allwpilib
|
||||
src_files = walk_cwd_and_copy_if(
|
||||
lambda dp, f: dp.endswith("src") and f.endswith(".cc") and f != "fmt.cc",
|
||||
lambda dp, f: dp.startswith("./src") and f.endswith(".cc") and f != "fmt.cc",
|
||||
os.path.join(wpiutil, "src/main/native/thirdparty/fmtlib"),
|
||||
)
|
||||
|
||||
# Copy fmt header files into allwpilib
|
||||
include_files = walk_cwd_and_copy_if(
|
||||
lambda dp, f: dp.endswith("include/fmt"),
|
||||
lambda dp, f: dp.startswith("./include/fmt"),
|
||||
os.path.join(wpiutil, "src/main/native/thirdparty/fmtlib"),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user