refactor: Move fname_path assignment inside try block in GitRepo.ignored_file_raw

This commit is contained in:
Paul Gauthier 2025-01-04 12:36:07 -08:00 committed by Paul Gauthier (aider)
parent e4a238a05c
commit 37ad4758a1

View file

@ -367,8 +367,8 @@ class GitRepo:
def ignored_file_raw(self, fname): def ignored_file_raw(self, fname):
if self.subtree_only: if self.subtree_only:
fname_path = Path(self.normalize_path(fname))
try: try:
fname_path = Path(self.normalize_path(fname))
cwd_path = Path.cwd().resolve().relative_to(Path(self.root).resolve()) cwd_path = Path.cwd().resolve().relative_to(Path(self.root).resolve())
except ValueError: except ValueError:
# Issue #1524 # Issue #1524