archive-backend/services/path.py
2026-11-07 17:27:59 +00:00

8 lines
173 B
Python

from urllib.parse import quote
def encode_path(path: str) -> str:
if not path:
return ""
return "/".join(quote(part, safe="") for part in path.split("/"))