summaryrefslogtreecommitdiff
path: root/src/remove.c
diff options
context:
space:
mode:
authorNadav Har'El <nyh@math.technion.ac.il>2011-01-11 07:53:07 -0700
committerEric Blake <eblake@redhat.com>2011-01-11 11:48:53 -0700
commit731f957965a6ad48deb6522ff87bcf52b1e523e4 (patch)
treef61137e91c48b504d6ab47e4b06a2f799912d22d /src/remove.c
parentdb1034ddaf93682426600cbf6cd8cb40568c999a (diff)
downloadcoreutils-731f957965a6ad48deb6522ff87bcf52b1e523e4.tar.xz
rm: ignore errno related to invalid file names
* src/remove.c (nonexistent_file_errno): Also skip EINVAL and EILSEQ, for at least smbfs rejection of '*' in file names. * NEWS: Mention the fix.
Diffstat (limited to 'src/remove.c')
-rw-r--r--src/remove.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/remove.c b/src/remove.c
index f7b00c62e..381423238 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -378,10 +378,18 @@ nonexistent_file_errno (int errnum)
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. */
+ even though ./foo does indeed exist.
+
+ Another case to consider is when a particular name is invalid for
+ a given file system. In 2011, smbfs returns EINVAL, but the next
+ revision of POSIX will require EILSEQ for that situation:
+ http://austingroupbugs.net/view.php?id=293
+ */
switch (errnum)
{
+ case EILSEQ:
+ case EINVAL:
case ENOENT:
case ENOTDIR:
return true;