[gnome-settings-daemon/benzea/housekeeping-warning: 10/10] housekeeping: Ignore permission issues during file deletion



commit 6aac44a17c6b5bcc258458d554963c51e019e489
Author: Benjamin Berg <bberg redhat com>
Date:   Mon Oct 8 21:10:04 2018 +0200

    housekeeping: Ignore permission issues during file deletion
    
    The directories that are monitored by gsd-housekeeping are likely to
    contain files from other users that cannot be deleted. This will result
    in permission denied errors that can be safely ignored.
    
    Fixes #26

 plugins/housekeeping/gsd-disk-space.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/plugins/housekeeping/gsd-disk-space.c b/plugins/housekeeping/gsd-disk-space.c
index 40f0a8b7..bd3437e5 100644
--- a/plugins/housekeeping/gsd-disk-space.c
+++ b/plugins/housekeeping/gsd-disk-space.c
@@ -366,7 +366,8 @@ delete_subdir (GObject      *source,
         enumerator = g_file_enumerate_children_finish (file, res, &error);
         if (error) {
                 if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_DIRECTORY) &&
-                    !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+                    !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED) &&
+                    !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED))
                         g_warning ("Failed to enumerate children of %s: %s\n", data->name, error->message);
         }
         if (enumerator) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]