CreateFile failing without setting Last Error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When passing a path in the form of "\??\c:\....", CreateFile fails because the path contains invalid characters. On windows error 161 is set, but on Wine not.

At least, until this patch is included.

Changelog
Shachar Shemesh <winecode@sun.consumer.org.il>

file/file.c

* Call "SetLastError" if the path contains wildcard characters.


Index: files/file.c
===================================================================
RCS file: /home/sun/sources/cvs/wine/files/file.c,v
retrieving revision 1.175
diff -u -r1.175 file.c
--- files/file.c	7 Jan 2003 20:36:22 -0000	1.175
+++ files/file.c	9 Jan 2003 06:13:46 -0000
@@ -623,7 +623,10 @@
 
     /* If the name contains a DOS wild card (* or ?), do no create a file */
     if(strchrW(filename, '*') || strchrW(filename, '?'))
+    {
+        SetLastError(ERROR_BAD_PATHNAME);
         return INVALID_HANDLE_VALUE;
+    }
 
     /* Open a console for CONIN$ or CONOUT$ */
     if (!strcmpiW(filename, coninW))

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux