From 167ae65695a8c8773052d876ba3360a2eade413f Mon Sep 17 00:00:00 2001 From: stkevintan Date: Sat, 6 Dec 2025 19:58:23 +0800 Subject: [PATCH] fix: path empty --- app/schemas/file.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/schemas/file.py b/app/schemas/file.py index 3bd970cd..ae21466e 100644 --- a/app/schemas/file.py +++ b/app/schemas/file.py @@ -24,7 +24,8 @@ class FileURI(BaseModel): path = uri[len(protocol):] storage = s.value break - + if not path.startswith("/"): + path = "/" + path path = Path(path).as_posix() return cls(storage=storage, path=path)