diff --git a/aider/commands.py b/aider/commands.py index 5ffef5ed2..ad4812c5c 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -307,9 +307,8 @@ class Commands: self.io.tool_error(f"No files matched '{word}'") for matched_file in matched_files: - relative_fname = os.path.relpath(matched_file, self.coder.root) - self.coder.abs_fnames.remove(matched_file) - self.io.tool_output(f"Removed {relative_fname} from the chat") + self.coder.abs_fnames.remove(str(Path(matched_file).resolve())) + self.io.tool_output(f"Removed {matched_file} from the chat") def cmd_run(self, args): "Run a shell command and optionally add the output to the chat"