summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2022-12-21 13:43:18 -0300
committerFelipe Borges <felipeborges@gnome.org>2022-12-21 18:44:42 +0100
commit47acab2c78b8a1c56cc96d1fc28c24dde228a0a7 (patch)
tree9714d11e3987897cb9a1eb5569c27e9200948c45
parentec1217c830a362a6ce43292817af399adf814385 (diff)
downloadgnome-control-center-47acab2c78b8a1c56cc96d1fc28c24dde228a0a7.tar.gz
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
-rw-r--r--panels/applications/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/panels/applications/utils.c b/panels/applications/utils.c
index bd4c0674e..a95241611 100644
--- a/panels/applications/utils.c
+++ b/panels/applications/utils.c
@@ -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);