Billy O'Neal wrote:
> I think ERROR_INVALID_DRIVE is dead.
> ...
> ERROR_BAD_NETPATH seems to happen when the path looks okay but DNS fails on 
> the input:
> ...
> I don’t think ERROR_DEV_NOT_EXIST can be triggered from a file path.

Thanks a lot for these infos! I'm updating the error mapping in gnulib:


2017-05-07 Bruno Haible  <br...@clisp.org>

        utime: Handle more Windows error codes.
        * lib/utime.c (utime): Handle ERROR_BAD_NETPATH.
        Based on explanations by Billy O'Neal.

diff --git a/lib/utime.c b/lib/utime.c
index ac5c78b..230d36b 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;
 


Reply via email to