}
}
+static GVariant *
+_ostree_repo_read_xattrs_file_link (OstreeRepo *self,
+ const char *checksum,
+ GCancellable *cancellable,
+ GError **error)
+{
+ g_assert (self != NULL);
+ g_assert (checksum != NULL);
+
+ char xattr_path[_OSTREE_LOOSE_PATH_MAX];
+ _ostree_loose_path (xattr_path, checksum, OSTREE_OBJECT_TYPE_FILE_XATTRS_LINK, self->mode);
+
+ g_autoptr(GVariant) xattrs = NULL;
+ glnx_autofd int fd = -1;
+ if (!glnx_openat_rdonly (self->objects_dir_fd, xattr_path, FALSE, &fd, error))
+ return FALSE;
+
+ g_assert (fd >= 0);
+ if (!ot_variant_read_fd (fd, 0, G_VARIANT_TYPE ("a(ayay)"), TRUE,
+ &xattrs, error))
+ return glnx_prefix_error_null (error, "Deserializing xattrs content");
+
+ g_assert (xattrs != NULL);
+ return g_steal_pointer (&xattrs);
+}
+
gboolean
_ostree_repo_load_file_bare (OstreeRepo *self,
const char *checksum,
return FALSE;
}
}
+ else if (self->mode == OSTREE_REPO_MODE_BARE_SPLIT_XATTRS)
+ {
+ if (out_xattrs)
+ {
+ ret_xattrs = _ostree_repo_read_xattrs_file_link(self, checksum, cancellable, error);
+ if (ret_xattrs == NULL)
+ return FALSE;
+ }
+ }
else
{
g_assert_not_reached ();