applications: Don't recurse into symlinks when clearing cache
Oh boy... what can I say. Sadly Builder symlinks to somewhere where we eventually end up in the home folder. And delete all files. :( Pass the FTW_PHYS flag to nftw() so it doesn't follow symlinks. Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2153
This commit is contained in:
parent
5f4bfd567a
commit
543ba4d58a
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ file_remove_thread_func (GTask *task,
|
|||
GFile *file = source_object;
|
||||
g_autofree gchar *path = g_file_get_path (file);
|
||||
|
||||
nftw (path, ftw_remove_cb, 20, FTW_DEPTH);
|
||||
nftw (path, ftw_remove_cb, 20, FTW_PHYS | FTW_DEPTH);
|
||||
|
||||
if (g_task_set_return_on_cancel (task, FALSE))
|
||||
g_task_return_boolean (task, TRUE);
|
||||
|
|
Loading…
Add table
Reference in a new issue