This commit is contained in:
Paul Gauthier 2023-07-23 08:34:56 -03:00
parent 9352bc67ca
commit d785d9a2e2

View file

@ -232,7 +232,9 @@ class Commands:
matched_files = [] matched_files = []
for fn in raw_matched_files: for fn in raw_matched_files:
matched_files += expand_subdir(fn.relative_to(self.coder.root)) matched_files += expand_subdir(fn)
matched_files = [str(Path(fn).relative_to(self.coder.root)) for fn in matched_files]
# if repo, filter against it # if repo, filter against it
if self.coder.repo: if self.coder.repo:
@ -426,6 +428,7 @@ def expand_subdir(file_path):
yield file_path yield file_path
return return
if file_path.is_dir():
for file in file_path.rglob("*"): for file in file_path.rglob("*"):
if file.is_file(): if file.is_file():
yield str(file) yield str(file)