diff --git a/libsecret/secret-backend.c b/libsecret/secret-backend.c index 946b342..73f0fd7 100644 --- a/libsecret/secret-backend.c +++ b/libsecret/secret-backend.c @@ -155,7 +155,7 @@ backend_get_impl_type (void) #endif #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 ()) extension_name = "file"; else diff --git a/libsecret/secret-file-backend.c b/libsecret/secret-file-backend.c index 649ef0d..ad19347 100644 --- a/libsecret/secret-file-backend.c +++ b/libsecret/secret-file-backend.c @@ -488,7 +488,7 @@ secret_file_backend_real_init_async (GAsyncInitable *initable, NULL); g_object_unref (file); 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->io_priority = io_priority; init->file = file;