commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r813553 - /commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c
Date Thu, 10 Sep 2009 19:27:24 GMT
Author: mturk
Date: Thu Sep 10 19:27:24 2009
New Revision: 813553

URL: http://svn.apache.org/viewvc?rev=813553&view=rev
Log:
Fix converting the //./pipe/

Modified:
    commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c?rev=813553&r1=813552&r2=813553&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c Thu Sep 10 19:27:24 2009
@@ -150,12 +150,23 @@
         else if ((srcstr[0] == '/' || srcstr[0] == '\\')
               && (srcstr[1] == '/' || srcstr[1] == '\\')
               && (srcstr[2] != '?')) {
-            /* Skip the slashes and ? */
-            srcstr += 2;
-            srclen -= 2;
-            wcscpy (retstr, L"\\\\?\\UNC\\");
-            retlen -= 8;
-            t += 8;
+            if (srcstr[2] == '.' && (srcstr[3] == '/' || srcstr[3] == '\\')) {
+                /* We have \\.\ sequence that can apear only
+                 * if we have something like \\.\pipe\
+                 */
+                wcscpy (retstr, L"\\\\.\\");
+                srcstr += 4;
+                retlen -= 4;
+                t += 4;
+            }
+            else {
+                /* Skip the slashes and ? */
+                srcstr += 2;
+                srclen -= 2;
+                wcscpy (retstr, L"\\\\?\\UNC\\");
+                retlen -= 8;
+                t += 8;
+            }
         }
         else if (srcstr[0] == '/' || srcstr[0] == '\\') {
             int cd;



Mime
View raw message