Skip to content

Conversation

@EpicPlayerA10
Copy link
Contributor

File explorers does not infer file type from its content, but rather from its file extension. This PR makes filesystem more consistent with the files explorers.

This also fixes some bugs where sometimes you couldn't unarchive some archives.

Copy link

@rmartinoscar rmartinoscar left a comment

Choose a reason for hiding this comment

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

Add error handling

Forget what i said

@EpicPlayerA10
Copy link
Contributor Author

EpicPlayerA10 commented Aug 20, 2024

Add error handling

But the method TypeByExtension does not return an error. When a mimetype for extension does not exists, then it will just return an empty string. Thats why i do the if check later to compare if the mimetype is not an empty string.

@EpicPlayerA10
Copy link
Contributor Author

EpicPlayerA10 commented Sep 15, 2024

For now this might be bad idea, because default linux mime.types file does not implement some file extensions, like .properties, and we can't edit those files in panel. So for now I will convert it to draft.

@EpicPlayerA10 EpicPlayerA10 marked this pull request as draft September 15, 2024 14:41
@danny6167
Copy link
Member

This also fixes some bugs where sometimes you couldn't unarchive some archives.

Is there an open issue for this ? If not, could you open one, ideally with an example file attached.

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.

3 participants