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

validate len of every windows path part #10

Closed
UncleGoogle opened this issue Jul 2, 2019 · 1 comment
Closed

validate len of every windows path part #10

UncleGoogle opened this issue Jul 2, 2019 · 1 comment
Assignees
Labels

Comments

@UncleGoogle
Copy link

long_part = 'a'*261
invalid_path = pathlib.Path.home() / long_part / 'another_part'

# windows limit suppressed but still there is 259 limit of the every middle part of path
invalid_path = '\\\\?\\' + str(pathlib.Path.home() / long_part / 'file.exe')

pathvalidate.validate_filepath(str(invalid_path), max_len=1024)  # no error
pathlib.Path(invalid_path).mkdir(parents=True)  # OSError: [WinError 123]
@thombashi thombashi self-assigned this Jan 1, 2020
thombashi added a commit that referenced this issue Jan 2, 2020
@thombashi thombashi added the bug label Jan 2, 2020
@thombashi
Copy link
Owner

Thank you for your report.

The problem fixed at pathvalidate 0.29.1.

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

No branches or pull requests

2 participants