Skip to content

Improve file handling robustness#6

Open
Timon-Schneider wants to merge 3 commits into
diogo-alves:mainfrom
Timon-Schneider:Fixing-edge-cases
Open

Improve file handling robustness#6
Timon-Schneider wants to merge 3 commits into
diogo-alves:mainfrom
Timon-Schneider:Fixing-edge-cases

Conversation

@Timon-Schneider

Copy link
Copy Markdown

Today I tried to process about 70,000 eml files and some errors occurred that I was able to fix for myself. I could not find any more errors with my files and wanted to share the code. Maybe it will help someone else.

Add UTF-8 encoding and add error handling.
Handle invalid character (backslash) in the path.
Attachment can be None, code now handles this case properly.
filename can contain invalid characters and can be split into multiple parts using filename* parameters, code now handles this case properly.
parent directory sometimes doesn't exist before trying to save the file, code now has proper directory creation handling.

Add UTF-8 encoding and add error handling.
Handle invalid character (backslash) in the path.
Attachment can be None, code now handles this case properly.
filename can contain invalid characters and can be split into multiple parts using filename* parameters, code now handles this case properly.
parent directory sometimes doesn't exist before trying to save the file, code now has proper directory creation handling.
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.

1 participant