mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 00:05:01 +00:00
use pathlib to ensure the parent dir is retained
This commit is contained in:
parent
65c12a73f6
commit
79030d968f
1 changed files with 1 additions and 5 deletions
|
@ -1,5 +1,4 @@
|
||||||
import json
|
import json
|
||||||
import os
|
|
||||||
import shlex
|
import shlex
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
@ -266,7 +265,6 @@ class Commands:
|
||||||
else:
|
else:
|
||||||
expanded_files.append(matched_file)
|
expanded_files.append(matched_file)
|
||||||
|
|
||||||
dump(expanded_files)
|
|
||||||
for matched_file in expanded_files:
|
for matched_file in expanded_files:
|
||||||
abs_file_path = self.coder.abs_root_path(matched_file)
|
abs_file_path = self.coder.abs_root_path(matched_file)
|
||||||
|
|
||||||
|
@ -396,9 +394,7 @@ class Commands:
|
||||||
self.io.tool_output(f"{cmd} No description available.")
|
self.io.tool_output(f"{cmd} No description available.")
|
||||||
|
|
||||||
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
def expand_subdir(file_path):
|
def expand_subdir(file_path):
|
||||||
for file in Path(file_path).rglob('*'):
|
for file in Path(file_path).rglob("*"):
|
||||||
if file.is_file():
|
if file.is_file():
|
||||||
yield str(file)
|
yield str(file)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue