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

Fix filename sanitation #22

Merged
merged 2 commits into from
Aug 14, 2017
Merged

Fix filename sanitation #22

merged 2 commits into from
Aug 14, 2017

Conversation

de-odex
Copy link
Contributor

@de-odex de-odex commented Aug 10, 2017

No description provided.

@@ -53,7 +53,7 @@ def keys(self):
if sys.platform.startswith('win'):
def sanitize_filename(name):
for invalid_character in r':*?"\/|<>[]':
name.replace(invalid_character, '')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That will do it. One other thing is that we are stripping too many characters, should we remove the ones that are not actually invalid?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd prefer not to strip characters that aren't the invalid ones

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, I totally agree. Some of the characters in the string are in fact valid for windows based on the original screen shot.

@llllllllll llllllllll merged commit edb9273 into llllllllll:master Aug 14, 2017
@llllllllll
Copy link
Owner

Thank you very much!

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

Successfully merging this pull request may close these issues.

2 participants