[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:
Tyler Veness
2023-08-28 15:07:13 -07:00
committed by GitHub
parent 9d86624c00
commit 360fb835f4
3 changed files with 5 additions and 7 deletions

View File

@@ -30,9 +30,7 @@ def main():
# Copy gcem include files into allwpilib
include_files = walk_cwd_and_copy_if(
lambda dp, f: dp.endswith("include")
or dp.endswith("gcem_incl")
or dp.endswith("quadrature"),
lambda dp, f: dp.startswith("./include"),
os.path.join(wpimath, "src/main/native/thirdparty/gcem"),
)