chore: nit cleanup in copy_to_directory _longest_glob_match helper (#275)

This commit is contained in:
Greg Magolan 2022-11-03 09:42:03 -07:00 committed by GitHub
parent bd65e6ccfb
commit 1f76b0b0bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -299,7 +299,7 @@ def _any_globs_match(exprs, path):
def _longest_glob_match(expr, path):
if not is_glob(expr):
return path[:len(expr)] if path.startswith(expr) else None
return expr if path.startswith(expr) else None
for i in range(len(path)):
maybe_match = path[:-i]