lib: Drop GFile variant mapping API for fd-relative

In addition to generic fd relative porting,
this is a necessary preparatory step for libglnx porting, because
when I tried to use `g_mapped_file_new` I hit an issue with
it using a different error domain from GIO.

Thankfully libglnx consistently uses the GIO error domain, and here
we're now using it for the `open()` call.

Closes: #317
Approved by: jlebon
This commit is contained in:
Colin Walters authored and Atomic Bot committed 2016-06-01 15:02:41 +00:00
1 parent f725d39f11
commit c148631a98
5 files changed
+7 -54

No files matched your search

+3 -2
View File
@@ -2098,8 +2098,9 @@ ostree_repo_read_commit_detached_metadata (OstreeRepo *self,
g_autoptr(GVariant) ret_metadata = NULL;
GError *temp_error = NULL;
if (!ot_util_variant_map (metadata_path, G_VARIANT_TYPE ("a{sv}"),
TRUE, &ret_metadata, &temp_error))
if (!ot_util_variant_map_at (AT_FDCWD, gs_file_get_path_cached (metadata_path),
G_VARIANT_TYPE ("a{sv}"),
TRUE, &ret_metadata, &temp_error))
{
if (g_error_matches (temp_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
{