delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/11/02/14:06:52

From: corinna DOT vinschen AT cityweb DOT de (Corinna Vinschen)
Subject: B20 patch: UNC device path handling
2 Nov 1998 14:06:52 -0800 :
Message-ID: <363E2732.9F4385BE.cygnus.cygwin32.developers@cityweb.de>
Mime-Version: 1.0
To: cygwin32-developers AT cygnus DOT com

Hello,

the handling of UNC device paths is incorrect. In the actual version,
the path must end with a colon. This ignores the existence of
paths like '\\.\tape0' or '\\.\physicaldrive2'. So, leave out
the "colon check".

Regards,
Corinna

---- snip ----
--- path.cc.orig        Mon Nov 02 22:24:51 1998
+++ path.cc     Mon Nov 02 22:35:36 1998
@@ -697,9 +697,8 @@ mount_info::conv_to_win32_path (const ch
          int j = mount[i].devicelen;
          memcpy (p, mount[i].device, j);
          /* Do not add trailing \ to UNC device names like \\.\a: */
-         if (pathbuf[mount[i].pathlen] != '/' &&
-               !(strncmp (mount[i].device, "\\\\.\\", 4) == 0 &&
-               mount[i].device[mount[i].devicelen-1] == ':'))
+         if (pathbuf[mount[i].pathlen] != '/'
+              && strncmp (mount[i].device, "\\\\.\\", 4))
            p[j++] = '\\';
          strcpy (p + j, pathbuf + mount[i].pathlen);
          backslashify (p, p, trailing_slash_p);

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019