Commit 6aac44a1 authored by Benjamin Berg's avatar Benjamin Berg Committed by Benjamin Berg

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
parent 4f9dbb49
Pipeline #40664 passed with stages
in 24 minutes and 4 seconds
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment