summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-10-03 22:06:31 +0000
committerJim Meyering <jim@meyering.net>2006-10-03 22:06:31 +0000
commita1da4a039d45f3442ddd61249d76bfd7d0382a5b (patch)
tree797495d41d7e46eabb3df958bf8d28cc30b26def /src
parent184dcf2cafbfaa93cdb2daf65c05025347d69a84 (diff)
downloadcoreutils-a1da4a039d45f3442ddd61249d76bfd7d0382a5b.tar.xz
* src/remove.c (nonexistent_file_errno): Remove ENAMETOOLONG.
Paul Eggert pointed out that the specified file may exist, in spite of such an errno value. * tests/rm/Makefile.am (TESTS): Remove ignore-name-too-long. * tests/rm/ignore-name-too-long: Remove file.
Diffstat (limited to 'src')
-rw-r--r--src/remove.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/remove.c b/src/remove.c
index 9d681c6e6..13a6e2768 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -930,10 +930,13 @@ static inline bool
nonexistent_file_errno (int errnum)
{
/* Do not include ELOOP here, since the specified file may indeed
- exist, but be (in)accessible only via too long a symlink chain. */
+ exist, but be (in)accessible only via too long a symlink chain.
+ Likewise for ENAMETOOLONG, since rm -f ./././.../foo may fail
+ if the "..." part expands to a long enough sequence of "./"s,
+ even though ./foo does indeed exist. */
+
switch (errnum)
{
- case ENAMETOOLONG:
case ENOENT:
case ENOTDIR:
return true;