summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-10-20 19:13:41 +0000
committerJim Meyering <jim@meyering.net>2001-10-20 19:13:41 +0000
commitbaef38bda137319a0593bfb57c41e0e6e1d95200 (patch)
tree2f32be489cff0d3d3ef8596eed5c452d4d705e3d /src
parentdc421733a10805c5e0a0efa34223816fee77876e (diff)
downloadcoreutils-baef38bda137319a0593bfb57c41e0e6e1d95200.tar.xz
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/touch.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/touch.c b/src/touch.c
index 517ec8481..e3871c6e2 100644
--- a/src/touch.c
+++ b/src/touch.c
@@ -145,8 +145,9 @@ touch (const char *file)
/* Don't save a copy of errno if it's EISDIR, since that would lead
touch to give a bogus diagnostic for e.g., `touch /' (assuming
- we don't own / or have write access to it). */
- if (fd == -1 && errno != EISDIR)
+ we don't own / or have write access to it). On Solaris 5.6,
+ and probably other systems, it is EINVAL. */
+ if (fd == -1 && errno != EISDIR && errno != EINVAL)
open_errno = errno;
}