Skip to content

glocalfileinfo: Ensure we always sniff some data to get the content type

Marco Trevisan requested to merge 3v1n0/glib:always-sniff-xdg-mime into main

In case the XDG database is not initialized yet we may try to sniff a 0-length data, making our content-type routines to mark non-empty files as application/x-zerosize.

This is clearly wrong, so in case the sniff size is not set, let's just try to read the default value. To avoid false-application/x-zerosize results.

Fixes: #2742 (closed)

Merge request reports