From eb5c620e3bc9744b7d5fc189389fc6ffa9853eed Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 7 May 2017 21:09:25 +0200 Subject: [PATCH] utime: Handle more Windows error codes. * lib/utime.c (utime): Handle ERROR_BAD_NETPATH. Based on explanations by Billy O'Neal. --- ChangeLog | 6 ++++++ lib/utime.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 91b2c5f133..75537dcaf5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2017-05-07 Bruno Haible + + utime: Handle more Windows error codes. + * lib/utime.c (utime): Handle ERROR_BAD_NETPATH. + Based on explanations by Billy O'Neal. + 2017-05-05 Bruno Haible crypto/rijndael: Fix "strict-aliasing rules" warnings, alignment issues. diff --git a/lib/utime.c b/lib/utime.c index ac5c78bcb0..230d36b52c 100644 --- a/lib/utime.c +++ b/lib/utime.c @@ -193,6 +193,7 @@ utime (const char *name, const struct utimbuf *ts) case ERROR_FILE_NOT_FOUND: /* The last component of rname does not exist. */ case ERROR_PATH_NOT_FOUND: /* Some directory component in rname does not exist. */ case ERROR_BAD_PATHNAME: /* rname is such as '\\server'. */ + case ERROR_BAD_NETPATH: /* rname is such as '\\nonexistentserver\share'. */ case ERROR_BAD_NET_NAME: /* rname is such as '\\server\nonexistentshare'. */ case ERROR_INVALID_NAME: /* rname contains wildcards, misplaced colon, etc. */ case ERROR_DIRECTORY: @@ -201,7 +202,6 @@ utime (const char *name, const struct utimbuf *ts) case ERROR_ACCESS_DENIED: /* rname is such as 'C:\System Volume Information\foo'. */ case ERROR_SHARING_VIOLATION: /* rname is such as 'C:\pagefile.sys'. */ - /* XXX map to EACCESS or EPERM? */ errno = (ts != NULL ? EPERM : EACCES); break; -- 2.39.5