From 97bb84b39bbf62b8264182435a8514675e9c10b4 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 10 May 2023 09:36:10 -0700 Subject: [PATCH] wip: Added absolute path to file names in Coder class. --- aider/coder.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aider/coder.py b/aider/coder.py index d79d04b41..55a2c9fa4 100755 --- a/aider/coder.py +++ b/aider/coder.py @@ -55,7 +55,7 @@ class Coder: else: self.console.print(f"[red]Loading {fname}") - self.fnames.add(str(fname)) + self.fnames.add(os.path.abspath(str(fname))) self.set_repo() if not self.repo: @@ -349,7 +349,7 @@ class Coder: path = path.strip() - full_path = os.path.join(self.root, path) + full_path = os.path.abspath(os.path.join(self.root, path)) if full_path not in self.fnames: if not Path(full_path).exists(): @@ -362,7 +362,7 @@ class Coder: self.console.print(f"[red]Skipping edit to {path}") continue - self.fnames.add(path) + self.fnames.add(os.path.abspath(path)) edited.add(path) if utils.do_replace(full_path, original, updated):