thombashi / pathvalidate

A Python library to sanitize/validate a string such as filenames/file-paths/etc.
https://pathvalidate.rtfd.io/
MIT License
210 stars 12 forks source link

Support longer paths for Windows 10/11 #31

Closed xtracool closed 1 year ago

xtracool commented 1 year ago

pathvalidate.sanitize_filename() is clipping to 255 on Windows 11.

My Windows 11 installation has long filename enabled by default in the registry. It would be good to either check that setting, or at least be able to override the 255 limit when calling the method.

thombashi commented 1 year ago

@xtracool You can increase the limit by the max_len argument of the function.