mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 06:15:00 +00:00
wip: Added absolute path to file names in Coder class.
This commit is contained in:
parent
28584b5705
commit
97bb84b39b
1 changed files with 3 additions and 3 deletions
|
@ -55,7 +55,7 @@ class Coder:
|
||||||
else:
|
else:
|
||||||
self.console.print(f"[red]Loading {fname}")
|
self.console.print(f"[red]Loading {fname}")
|
||||||
|
|
||||||
self.fnames.add(str(fname))
|
self.fnames.add(os.path.abspath(str(fname)))
|
||||||
|
|
||||||
self.set_repo()
|
self.set_repo()
|
||||||
if not self.repo:
|
if not self.repo:
|
||||||
|
@ -349,7 +349,7 @@ class Coder:
|
||||||
|
|
||||||
path = path.strip()
|
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 full_path not in self.fnames:
|
||||||
if not Path(full_path).exists():
|
if not Path(full_path).exists():
|
||||||
|
@ -362,7 +362,7 @@ class Coder:
|
||||||
self.console.print(f"[red]Skipping edit to {path}")
|
self.console.print(f"[red]Skipping edit to {path}")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
self.fnames.add(path)
|
self.fnames.add(os.path.abspath(path))
|
||||||
|
|
||||||
edited.add(path)
|
edited.add(path)
|
||||||
if utils.do_replace(full_path, original, updated):
|
if utils.do_replace(full_path, original, updated):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue