Skip to content

Use "fast" content type as fallback if normal content type is unavailable

Felix Riemann requested to merge wip/fast-content-type into master

Depending on the responsible gvfs backend a GFileInfo may not have the content type set even if requested by the query. The fast content type attribute is usually set in these cases. In the case of #312 (closed) the SMB backend doesn't set the content type if it is "uncertain" after checking the file name, specifically for PNG files as a ".png" might be a PNG or an APNG (since shared-mime-info 2.3). That was changed by gvfs!68 (merged), which also reconfirms the relationship between "content type" and "fast content type".

This changes all instances of g_file_info_get_content_type in eog to automatically fall back to the fast content type, as there's no code handling unset content types.

Fixes #312 (closed).

Edited by Felix Riemann

Merge request reports