Skip to content

Commit

Permalink
fix: only evaluate mtime on matched local files
Browse files Browse the repository at this point in the history
  • Loading branch information
otosky committed Dec 23, 2024
1 parent 2253401 commit 09b2362
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dbt_common/clients/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,16 @@ def find_matching(
# if ignore_spec.match(relative_dir):
# continue
for local_file in local_files:
if not reobj.match(local_file):
continue

absolute_path = os.path.join(current_path, local_file)
relative_path = os.path.relpath(absolute_path, absolute_path_to_search)
relative_path_to_root = os.path.join(relative_path_to_search, relative_path)

modification_time = os.path.getmtime(absolute_path)
if reobj.match(local_file) and (
not ignore_spec or not ignore_spec.match_file(relative_path_to_root)
):

if not ignore_spec or not ignore_spec.match_file(relative_path_to_root):
matching.append(
{
"searched_path": relative_path_to_search,
Expand Down

0 comments on commit 09b2362

Please sign in to comment.