[libgsystem] shutil: Treat ELOOP like ENOTDIR
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgsystem] shutil: Treat ELOOP like ENOTDIR
- Date: Tue, 10 Sep 2013 22:08:04 +0000 (UTC)
commit c72d84a0a9edcccb366ba41b74e7a41a6d625ab1
Author: Colin Walters <walters verbum org>
Date: Tue Sep 10 18:07:17 2013 -0400
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 files changed, 1 insertions(+), 1 deletions(-)
---
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]