mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-10-19 07:23:51 +00:00
fix: create watch directory if it doesn't exist instead of raising FileNotFoundError
This commit is contained in:
parent
a82312f524
commit
f249aa15dd
1 changed files with 1 additions and 1 deletions
|
|
@ -256,7 +256,7 @@ class _WatchRegistry:
|
|||
def _normalize_root(root: str) -> str:
|
||||
normalized = os.path.abspath(os.path.normpath(root))
|
||||
if not os.path.exists(normalized):
|
||||
raise FileNotFoundError(normalized)
|
||||
os.makedirs(normalized, exist_ok=True)
|
||||
if not os.path.isdir(normalized):
|
||||
raise NotADirectoryError(normalized)
|
||||
return normalized
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue