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

sanitize_filepath: "./" is unnecessarily modified when platform="Linux" #13

Closed MagnetoOptical closed 4 years ago

MagnetoOptical commented 4 years ago

If you pass ./whatever/path to sanitizefilepath, "./" is changed to "./"

Since "./" != "._/" on any platform this will cause code using pathvalidate to throw an exception down the line.

thombashi commented 4 years ago

@ProfElectric Thank you for your report.

I had fixed the issue at pathvalidate 2.3.0. Please try to upgrade the package.