mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 03:02:10 +01:00
Use g_build_filename
Instead of manual path construction. Pointed out by Cosimo.
This commit is contained in:
parent
5090920c98
commit
f08b703f84
@ -28,7 +28,7 @@ glib_should_use_portal (void)
|
||||
const char *use_portal;
|
||||
char *path;
|
||||
|
||||
path = g_strdup_printf ("%s/flatpak-info", g_get_user_runtime_dir ());
|
||||
path = g_build_filename (g_get_user_runtime_dir (), "flatpak-info", NULL);
|
||||
if (g_file_test (path, G_FILE_TEST_EXISTS))
|
||||
use_portal = "1";
|
||||
else
|
||||
@ -49,8 +49,7 @@ glib_network_available_in_sandbox (void)
|
||||
GKeyFile *keyfile;
|
||||
gboolean available = TRUE;
|
||||
|
||||
path = g_strdup_printf ("%s/flatpak-info", g_get_user_runtime_dir ());
|
||||
|
||||
path = g_build_filename (g_get_user_runtime_dir (), "flatpak-info", NULL);
|
||||
keyfile = g_key_file_new ();
|
||||
if (g_key_file_load_from_file (keyfile, path, G_KEY_FILE_NONE, NULL))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user