From c72d84a0a9edcccb366ba41b74e7a41a6d625ab1 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 10 Sep 2013 18:07:17 -0400 Subject: shutil: Treat ELOOP like ENOTDIR We can apparently get this if we try to open with O_NOFOLLOW a chain of symlinks. Just treat it like it's not a directory so we unlink. --- gsystem-shutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsystem-shutil.c b/gsystem-shutil.c index 4ea3ca9..a8dbc18 100644 --- a/gsystem-shutil.c +++ b/gsystem-shutil.c @@ -362,7 +362,7 @@ gs_shutil_rm_rf (GFile *path, { ; } - else if (errsv == ENOTDIR) + else if (errsv == ENOTDIR || errsv == ELOOP) { if (!gs_file_unlink (path, cancellable, error)) goto out; -- cgit v1.2.1