Commit 1e899dfa authored by Ulrich Czekalla's avatar Ulrich Czekalla Committed by Alexandre Julliard

Check for existence if MMIO_EXIST is passed to MMIO_Open.

parent 7d50ae6f
......@@ -345,11 +345,13 @@ static HMMIO16 MMIO_Open(LPSTR szFileName, MMIOINFO* refmminfo, DWORD dwOpenFlag
TRACE("('%s', %p, %08lX, %d);\n", szFileName, refmminfo, dwOpenFlags, b32bit?32:16);
if (dwOpenFlags & MMIO_PARSE) {
if (dwOpenFlags & (MMIO_PARSE|MMIO_EXIST)) {
char buffer[MAX_PATH];
if (GetFullPathNameA(szFileName, sizeof(buffer), buffer, NULL) >= sizeof(buffer))
return (HMMIO16)FALSE;
if ((dwOpenFlags&MMIO_EXIST)&&(GetFileAttributesA(buffer)==-1))
return (HMMIO16)FALSE;
strcpy(szFileName, buffer);
return (HMMIO16)TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment