mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-05 13:52:38 +02:00
compatible with windows path
This commit is contained in:
parent
dcb0623d46
commit
5edee1299c
2 changed files with 8 additions and 7 deletions
|
|
@ -93,11 +93,10 @@ class DependencyFile:
|
|||
|
||||
root = self._filename.parent
|
||||
try:
|
||||
key = Path(filename).relative_to(root)
|
||||
key = Path(filename).relative_to(root).as_posix()
|
||||
except ValueError:
|
||||
key = filename
|
||||
key = re.sub(r"\\+", "/", str(key))
|
||||
return set(self._dependencies.get(key, {}))
|
||||
return set(self._dependencies.get(str(key), {}))
|
||||
|
||||
def delete_file(self):
|
||||
"""Delete the dependency file."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue