Skip to content

Sanitize filename prior to creating contact files#7

Open
quinn-p-mchugh wants to merge 3 commits intosVathis:masterfrom
quinn-p-mchugh:dev/fix-filename-error
Open

Sanitize filename prior to creating contact files#7
quinn-p-mchugh wants to merge 3 commits intosVathis:masterfrom
quinn-p-mchugh:dev/fix-filename-error

Conversation

@quinn-p-mchugh
Copy link

@quinn-p-mchugh quinn-p-mchugh commented Aug 6, 2024

Some of my Google Contacts contain characters that are incompatible with Windows file systems, such as <>:"/\\|?*. This caused an error when trying to create markdown files for these contacts.

This pull request adds a method to the md_person class called _sanitize_filename and uses that method to replace these invalid characters with underscores before markdown files are created. This prevents errors with trying to create files with invalid paths.

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

Comments