core: Ensure glib standard::size attribute is always set
authorEvan Anderson <evan@eaanderson.com>
Thu, 16 Mar 2023 02:33:21 +0000 (21:33 -0500)
committerEvan Anderson <evan@eaanderson.com>
Thu, 16 Mar 2023 03:15:55 +0000 (22:15 -0500)
commit376c9d7effa01fa020711a3f12829fe9b18b8bca
tree364fc06aea7f859024e905940718b34b3d69f10b
parentc5bfd677edef2a99f275b5450a730519286fe175
core: Ensure glib standard::size attribute is always set

* A recent change in glib [1] requires that the appropriate attribute
be available when calling getters. ostree core only sets this attribute
on regular files, and frequently triggers the critical warning. Solve
this by setting standard::size to zero for non-regular files.

Fixes https://github.com/ostreedev/ostree/issues/2827

[1]: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3261
src/libostree/ostree-core.c