fix: create watch directory if it doesn't exist instead of raising FileNotFoundError

frdel committed Mar 19, 2026 at 20:52 UTC f249aa15dd578ade88584e3e0831d01a33e980ae
1 file changed +1 -1
helpers/watchdog.py
+1 -1
@@ -256,7 +256,7 @@ class _WatchRegistry:
256 def _normalize_root(root: str) -> str:
257 normalized = os.path.abspath(os.path.normpath(root))
258 if not os.path.exists(normalized):
259 - raise FileNotFoundError(normalized)
259 + os.makedirs(normalized, exist_ok=True)
260 if not os.path.isdir(normalized):
261 raise NotADirectoryError(normalized)
262 return normalized