You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can tell under the Windows platform, the following issues exist:
These are for sanitize_filepath:
The filepath can not start with os.sep (eg. "/users/benjamin/test.zip")
from pathvalidate import sanitize_filepath
sanitize_filepath(r"users\benjamin\test\test1.zip")
'users/benjamin/test/test1.zip'
sanitize_filepath(r"\users\benjamin\test\test1.zip")
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\bschollnick.URMC-SH\python3\av1\lib\site-packages\pathvalidate_filepath.py", line 376, in sanitize_filepath
).sanitize(file_path, replacement_text)
File "C:\Users\bschollnick.URMC-SH\python3\av1\lib\site-packages\pathvalidate_filepath.py", line 74, in sanitize
self.__fpath_validator.validate_abspath(value)
File "C:\Users\bschollnick.URMC-SH\python3\av1\lib\site-packages\pathvalidate_filepath.py", line 206, in validate_abspath
raise err_object
pathvalidate.error.ValidationError: reason=MALFORMED_ABS_PATH, target-platform=universal, description=an invalid absolute file path (\users\benjamin\test\test1.zip) for the platform (universal). to avoid the error, specify an appropriate platform correspond with the path format, or 'auto'.
sanitize_filepath does not seem to respect the os.sep setting of the platform it is running on:
As far as I can tell under the Windows platform, the following issues exist:
These are for sanitize_filepath:
Please note, the string I passed in was using os.sep. What was returned, did not use os.sep.
The text was updated successfully, but these errors were encountered: