Compare commits

...

1 Commits

Author SHA1 Message Date
Adriano f986c172c2 Worker: recipe_dir con lettera di unita rifiutato su ogni OS (#46)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-07 12:32:34 +02:00
+3
View File
@@ -10,6 +10,7 @@ import asyncio
import io
import json
import os
import re
from pathlib import Path
import numpy as np
@@ -61,6 +62,8 @@ def _resolve_recipe_dir(recipe_dir: str | None) -> Path | None:
root = Path(os.environ.get("VISION_RECIPES_ROOT", _RECIPES_ROOT_DEFAULT)).resolve()
if (
Path(rel).is_absolute()
# #46: lettera di unita (C:/x) rifiutata su ogni OS; UNC coperto da startswith("\\")
or re.match(r"^[A-Za-z]:", rel)
or rel.startswith(("/", "\\"))
or ".." in Path(rel.replace("\\", "/")).parts
):