Skip to content

Backport !2887 “glocalfileinfo: Ensure we always sniff some data to get the content type” to glib-2-74

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 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 (that are not something we want as per legacy assumptions).


Fixes: #2742 (closed)

Trivial backport of !2887 (merged) to glib-2-74.

Merge request reports