diff options
author | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2022-12-21 13:43:18 -0300 |
---|---|---|
committer | Felipe Borges <felipeborges@gnome.org> | 2022-12-21 18:44:42 +0100 |
commit | 47acab2c78b8a1c56cc96d1fc28c24dde228a0a7 (patch) | |
tree | 9714d11e3987897cb9a1eb5569c27e9200948c45 | |
parent | ec1217c830a362a6ce43292817af399adf814385 (diff) | |
download | gnome-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.c | 2 |
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); |