Merge branch 'snaps-use-portal' into 'master'

Handle snaps the same way as flatpaks

See merge request GNOME/libsecret!67
This commit is contained in:
Niels De Graef 2021-02-21 21:39:55 +00:00
commit 95b154f442
2 changed files with 2 additions and 2 deletions

View File

@ -155,7 +155,7 @@ backend_get_impl_type (void)
#endif #endif
#ifdef WITH_GCRYPT #ifdef WITH_GCRYPT
if (g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS) && if ((g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS) || g_getenv ("SNAP_NAME") != NULL) &&
_secret_file_backend_check_portal_version ()) _secret_file_backend_check_portal_version ())
extension_name = "file"; extension_name = "file";
else else

View File

@ -488,7 +488,7 @@ secret_file_backend_real_init_async (GAsyncInitable *initable,
NULL); NULL);
g_object_unref (file); g_object_unref (file);
secret_value_unref (password); secret_value_unref (password);
} else if (g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS)) { } else if (g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS) || g_getenv ("SNAP_NAME") != NULL) {
init = g_slice_new0 (InitClosure); init = g_slice_new0 (InitClosure);
init->io_priority = io_priority; init->io_priority = io_priority;
init->file = file; init->file = file;