You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/09/10 21:27:24 UTC
svn commit: r813553 -
/commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c
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;