refactor: improve file handling and error reporting in Coder class

This commit is contained in:
Paul Gauthier 2024-08-31 08:15:02 -07:00 committed by Paul Gauthier (aider)
parent b6b4fc6fab
commit 01964ca294
2 changed files with 17 additions and 12 deletions

View file

@ -292,6 +292,7 @@ def format_tokens(count):
def touch_file(fname):
fname = Path(fname)
try:
fname.parent.mkdir(parents=True, exist_ok=True)
fname.touch()