From 567bcf130ff52e5a414d74d7668ed722cab66d33 Mon Sep 17 00:00:00 2001 From: Francois Boisvert <francois@macadamian.com> Date: Mon, 20 Sep 1999 18:31:21 +0000 Subject: [PATCH] CreateFileA returns HFILE_ERROR when the filename contains a wild card. --- files/file.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/file.c b/files/file.c index 379676507ee..3e5785bbe3b 100644 --- a/files/file.c +++ b/files/file.c @@ -449,6 +449,10 @@ HFILE WINAPI CreateFileA( LPCSTR filename, DWORD access, DWORD sharing, return HFILE_ERROR; } + /* If the name contains a DOS wild card (* or ?), do no create a file */ + if(strchr(filename,'*') || strchr(filename,'?')) + return HFILE_ERROR; + /* Open a console for CONIN$ or CONOUT$ */ if (!lstrcmpiA(filename, "CONIN$")) return CONSOLE_OpenHandle( FALSE, access, sa ); if (!lstrcmpiA(filename, "CONOUT$")) return CONSOLE_OpenHandle( TRUE, access, sa ); -- GitLab