diff options
Diffstat (limited to 'src/touch.c')
-rw-r--r-- | src/touch.c | 5 |
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; } |