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:
1 parent
f725d39f11
commit
c148631a98
5 files changed
+7
-54
No files matched your search
@@ -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))
|
||||
{
|
||||
|
||||
@@ -4627,8 +4627,9 @@ ostree_repo_add_gpg_signature_summary (OstreeRepo *self,
|
||||
if (!summary_data)
|
||||
goto out;
|
||||
|
||||
if (!ot_util_variant_map (signature_path, G_VARIANT_TYPE (OSTREE_SUMMARY_SIG_GVARIANT_STRING),
|
||||
TRUE, &existing_signatures, &temp_error))
|
||||
if (!ot_util_variant_map_at (AT_FDCWD, gs_file_get_path_cached (signature_path),
|
||||
G_VARIANT_TYPE (OSTREE_SUMMARY_SIG_GVARIANT_STRING),
|
||||
TRUE, &existing_signatures, &temp_error))
|
||||
{
|
||||
if (g_error_matches (temp_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user