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

It looks like platform name is not taken into account during sanitization #7

Closed
julchenok opened this issue Jan 3, 2019 · 3 comments
Assignees
Labels

Comments

@julchenok
Copy link

Method sanitize() in class FileNameSanitizer uses __RE_INVALID_WIN_FILENAME constant independently from inbound platform name. Shouldn't it check platform and use __RE_INVALID_FILENAME in case of non-windows OS?

See code at line:

sanitize_file_name = self.__RE_INVALID_WIN_FILENAME.sub(replacement_text, self._str)

Similar situation is in sanitize() method in FilePathSanitizer class:

sanitized_path = self.__RE_INVALID_WIN_PATH.sub(replacement_text, unicode_file_path)

@thombashi thombashi self-assigned this Jan 4, 2019
@thombashi thombashi added the bug label Jan 4, 2019
@thombashi
Copy link
Owner

Thank you for your feedback.
I will fix that in future release.

@thombashi
Copy link
Owner

I had fixed the issue at pathvalidate 0.23.0.

@thombashi
Copy link
Owner

I'll close the issue.
Feel free to reopen if you still have any problems about the issue.

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