bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] [PATCH] Report race on systems without O_DIRECTORY


From: Pavel Raiskup
Subject: [Bug-tar] [PATCH] Report race on systems without O_DIRECTORY
Date: Tue, 31 Jul 2018 10:55:58 +0200

* src/names.c (collect_and_sort_names): Report ENOTDIR after
successful fstat() but !S_ISDIR.
---
 src/names.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/names.c b/src/names.c
index f6ad9fe..f4dc978 100644
--- a/src/names.c
+++ b/src/names.c
@@ -1767,6 +1767,11 @@ collect_and_sort_names (void)
                  name->found_count++;
                  add_hierarchy_to_namelist (&st, name);
                }
+             else
+               {
+                 errno = ENOTDIR;
+                 open_diag (name->name);
+               }
            }
        }
 
-- 
2.17.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]