| @@ -19,7 +19,7 @@ import os | |||||
| def validate_and_normalize_path( | def validate_and_normalize_path( | ||||
| path, | path, | ||||
| check_absolute_path=False, | check_absolute_path=False, | ||||
| allow_parent_dir=False, | |||||
| allow_parent_dir=True, | |||||
| ): | ): | ||||
| """ | """ | ||||
| Validates path and returns its normalized form. | Validates path and returns its normalized form. | ||||
| @@ -45,7 +45,7 @@ def validate_and_normalize_path( | |||||
| if not allow_parent_dir: | if not allow_parent_dir: | ||||
| path_components = path_str.split("/") | path_components = path_str.split("/") | ||||
| if ".." in path_components: | if ".." in path_components: | ||||
| raise RuntimeError("The path is invalid!") | |||||
| raise RuntimeError("The parent path is not allowed!") | |||||
| # path does not have valid schema, treat it as unix local path. | # path does not have valid schema, treat it as unix local path. | ||||
| if check_absolute_path: | if check_absolute_path: | ||||