mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Improve error message
This commit is contained in:
parent
e3d7d08eab
commit
0a32e46295
1 changed files with 2 additions and 1 deletions
|
@ -147,7 +147,8 @@ def path_to_filesystem(root, *paths):
|
||||||
continue
|
continue
|
||||||
for part in path.split("/"):
|
for part in path.split("/"):
|
||||||
if not is_safe_filesystem_path_component(part):
|
if not is_safe_filesystem_path_component(part):
|
||||||
raise ValueError("Unsafe path")
|
raise ValueError(
|
||||||
|
"Can't tranlate name safely to filesystem: %s" % part)
|
||||||
safe_path = os.path.join(safe_path, part)
|
safe_path = os.path.join(safe_path, part)
|
||||||
return safe_path
|
return safe_path
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue