From c82c31d994656c0cc72d7dde89546fc78da70b96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Thu, 1 Jul 2021 16:30:35 +0200 Subject: files-view: Simplify file object creation Use `g_file_new_build_filename()` to create the file object for the "Wallpapers" directory instead of the previously used `g_file_new_for_path()` + `g_file_get_child()` in `set_wallpaper_fallback()`. --- src/nautilus-files-view.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c index 5f3e10d46..17f397322 100644 --- a/src/nautilus-files-view.c +++ b/src/nautilus-files-view.c @@ -6856,13 +6856,13 @@ set_wallpaper_fallback (NautilusFile *file, { g_autofree char *target_uri = NULL; GList *uris; - g_autoptr (GFile) parent = NULL; g_autoptr (GFile) target = NULL; /* Copy the item to Pictures/Wallpaper (internationalized) since it may be * remote. Then set it as the current wallpaper. */ - parent = g_file_new_for_path (g_get_user_special_dir (G_USER_DIRECTORY_PICTURES)); - target = g_file_get_child (parent, _("Wallpapers")); + target = g_file_new_build_filename (g_get_user_special_dir (G_USER_DIRECTORY_PICTURES), + _("Wallpapers"), + NULL); g_file_make_directory_with_parents (target, NULL, NULL); target_uri = g_file_get_uri (target); uris = g_list_prepend (NULL, nautilus_file_get_uri (file)); -- cgit v1.2.1