Prevent wildcards from being accepted in filenames (NT mode)

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

 



Changelog
Shachar Shemesh <winecode@xxxxxxxxxxx>

   * files/dos_fs.c
         o If in NT mode, a filename containing wildcards characters (?
           and *) is rejected with ERROR_BAD_PATHNAME


-- Shachar Shemesh Open Source integration & consulting Home page & resume - http://www.shemesh.biz/

Index: files/dos_fs.c
===================================================================
RCS file: /home/sun/sources/cvs/wine/files/dos_fs.c,v
retrieving revision 1.142
diff -u -r1.142 dos_fs.c
--- files/dos_fs.c	15 Nov 2003 00:13:21 -0000	1.142
+++ files/dos_fs.c	26 Nov 2003 18:43:40 -0000
@@ -1047,6 +1047,13 @@
         return FALSE;
     }
 
+    /* If wer'e in NT mode - don't allow wildcards in file name */
+    if( (strchrW(name, '?') || strchrW(name, '*')) && (GetVersion()&0x80000000)==0 )
+    {
+        SetLastError(ERROR_INVALID_NAME);
+        return FALSE;
+    }
+
     if ((full->drive = DOSFS_GetPathDrive( &name )) == -1) return FALSE;
     flags = DRIVE_GetFlags( full->drive );
 

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

  Powered by Linux