summaryrefslogtreecommitdiff
path: root/icons
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2020-09-16 12:48:30 +0200
committerAntónio Fernandes <antoniojpfernandes@gmail.com>2020-09-21 09:52:23 +0000
commit36e505c12ce7057e444d929c96ac810ce85192e7 (patch)
tree7903383bddd1c6d47e83460bc3a53d54109d36fc /icons
parent9f344bfc2d33a869c421f6dc197f42bae8b5e65a (diff)
downloadnautilus-36e505c12ce7057e444d929c96ac810ce85192e7.tar.gz
file-operation: Prevent recursion to speed up emptying trash
Emptying trash within Nautilus is a bit slow in comparison to plain `rm -r`. On my system, it took about 3 min to empty the trash with a folder containing 600 000 files, which is not ideal as `rm -r` call took just a few seconds. I found that `g_file_delete` is implemented differently for locations provided by the trash backend. The trash backend prevents modifications of trashed content thus the delete operation is allowed only for the top-level files and folders. So it is not necessary to recursive delete all files as the permission denied error is returned anyway. Let's call `g_file_delete` only for top-level items, which reduces the time necessary for emptying trash from minutes to seconds... Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1589
Diffstat (limited to 'icons')
0 files changed, 0 insertions, 0 deletions