refactor: Simplify original read-only files check in _drop_all_files method

This commit is contained in:
Paul Gauthier (aider) 2025-03-11 17:33:57 -07:00
parent 1f874b654d
commit d45af94cee

View file

@ -361,7 +361,7 @@ class Commands:
self.coder.abs_fnames = set() self.coder.abs_fnames = set()
# When dropping all files, keep those that were originally provided via args.read # When dropping all files, keep those that were originally provided via args.read
if hasattr(self, "original_read_only_fnames") and self.original_read_only_fnames: if self.original_read_only_fnames:
# Keep only the original read-only files # Keep only the original read-only files
to_keep = set() to_keep = set()
for abs_fname in self.coder.abs_read_only_fnames: for abs_fname in self.coder.abs_read_only_fnames: