Skip to content

files-view: don't copy wallpaper unnecessarily

Barnabás Pőcze requested to merge pobrn/nautilus:dont_copy_wallpaper into master

At the moment, when selecting an image that is in Pictures/Wallpapers to be set as wallpaper, a copy is be created, which makes it inconvenient to store a collection of wallpapers there due to the unnecessary copies.

While at it, convert the code to use g_autoptr and g_autofree; and modify the comment accordingly.

g_file_equal(), at least for local files, won't always be correct (e.g. bind mounts) since it only compares filenames, but it should cover the vast majority of cases. For false negatives, the programs falls back to the old behavior: copying.

Merge request reports