Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

max path length is confused with max filename length when validating/sanitizing filepaths #51

Open
7x11x13 opened this issue Jun 24, 2024 · 0 comments

Comments

@7x11x13
Copy link
Contributor

7x11x13 commented Jun 24, 2024

Code to reproduce:

from pathvalidate import validate_filepath

p = "./" + "a" * 280
validate_filepath(p, platform="Linux")

This runs with no error. The expected output would be an error stating that the length of the filename is too long (280 > 255). I think the file path sanitizer should take two max length args: one for max filename length and one for max filepath length.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant