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

Hardcoded most used extension and mimetypes as possible crash fix #796

Merged
merged 1 commit into from
Oct 28, 2023

Conversation

michalrentka
Copy link
Contributor

There are numerous crashes with no real info in them, but they all seem to be processing translators in the background and the crash points to mimeTypeFromExtension being called, even though it's not specifically mentioned that it crashes there. We encountered similar issue with extensionFromMimeType a long time ago, so it might be worth a try to hard code most used values.

@michalrentka michalrentka requested a review from mvasilak October 27, 2023 19:51
Copy link
Contributor

@mvasilak mvasilak left a comment

Choose a reason for hiding this comment

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

An interesting improvement in the future would be to have a bidirectional map, that could also be initialized from a configuration file. But for the time being 👌

@michalrentka michalrentka merged commit 328e8f3 into zotero:master Oct 28, 2023
@michalrentka michalrentka deleted the typedetectionfix branch October 28, 2023 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants