From dd7523d518e62facf41b75e198667e4f4e694287 Mon Sep 17 00:00:00 2001
From: Marcus Meissner <marcus@jet.franken.de>
Date: Sun, 23 Jan 2000 02:18:27 +0000
Subject: [PATCH] Handle \\.\<dosdevice> like <dosdevice> in CreateFile. Tested
 with help of James Feeney <james@nurealm.net>.

---
 files/file.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/files/file.c b/files/file.c
index 2c373d22907..e805994cc60 100644
--- a/files/file.c
+++ b/files/file.c
@@ -438,8 +438,12 @@ HANDLE WINAPI CreateFileA( LPCSTR filename, DWORD access, DWORD sharing,
 	}
     }
 
-    if (!strncmp(filename, "\\\\.\\", 4))
-        return DEVICE_Open( filename+4, access, sa );
+    if (!strncmp(filename, "\\\\.\\", 4)) {
+        if (!DOSFS_GetDevice( filename ))
+        	return DEVICE_Open( filename+4, access, sa );
+	else
+        	filename+=4; /* fall into DOSFS_Device case below */
+    }
 
     /* If the name still starts with '\\', it's a UNC name. */
     if (!strncmp(filename, "\\\\", 2))
-- 
GitLab