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



commit e69149856fc4c40e88efe827aef5d0da168fa7a8
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 0eee94ea..24a3646a 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]