We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Due to these changes: d94185a#diff-50b900757c3f8a8a6773c06200526edaec2b20b6543e722d32a36fc1f09abaa5L237
Using . or .. as additional_reserved_names no longer works as expected:
.
..
additional_reserved_names
from pathvalidate import sanitize_filename print(sanitize_filename("..", additional_reserved_names=[".", ".."])) print(sanitize_filename(".", additional_reserved_names=[".", ".."]))
result:
_._._ _._
For my specific use case, I want to sanitize "." and ".." filenames on windows (as recommended here):
def add_trailing_underscore(e: ValidationError) -> str: if e.reusable_name: return e.reserved_name return f"{e.reserved_name}_" print(sanitize_filename("..", reserved_name_handler=add_trailing_underscore, additional_reserved_names=[".."]))
In v3.2.1 this printed .._ but in v3.2.2 it prints _._._
v3.2.1
.._
v3.2.2
_._._
Thanks!
The text was updated successfully, but these errors were encountered:
Fix dot-files validation: #59
2312adc
Signed-off-by: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
@slingshotvfx Thank you for your report. The problem has been fixed at pathvalidate 3.2.3
pathvalidate 3.2.3
Sorry, something went wrong.
3.2.3 works for me, thanks for fixing it so quickly!
3.2.3
Successfully merging a pull request may close this issue.
Due to these changes:
d94185a#diff-50b900757c3f8a8a6773c06200526edaec2b20b6543e722d32a36fc1f09abaa5L237
Using
.
or..
asadditional_reserved_names
no longer works as expected:result:
For my specific use case, I want to sanitize "." and ".." filenames on windows (as recommended here):
In
v3.2.1
this printed.._
but inv3.2.2
it prints_._._
Thanks!
The text was updated successfully, but these errors were encountered: