From 51e30469326a00a195e00d1b7cb5ea0ed85f458b Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 25 Oct 1998 09:19:54 +0000 Subject: [PATCH] Delete the filename for the mapping instantly. --- memory/virtual.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/memory/virtual.c b/memory/virtual.c index 3242160c743..4414e94a6ae 100644 --- a/memory/virtual.c +++ b/memory/virtual.c @@ -1145,14 +1145,12 @@ HANDLE32 WINAPI CreateFileMapping32A( CHAR buf[260]; GetTempPath32A(260,buf); - GetTempFileName32A(buf,"wine",260,buf); + GetTempFileName32A(buf,"wine",0,buf); hFile = CreateFile32A(buf,GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_ALWAYS,0,0); + /* FIXME: bad hack to avoid lots of leftover tempfiles */ + DeleteFile32A(buf); if (hFile == INVALID_HANDLE_VALUE32) FIXME(virtual,"could not create temp. file for anon shared mapping: reason was 0x%08lx\n",GetLastError()); - else { - SetFilePointer(hFile,size_low,&size_high,FILE_BEGIN); - SetEndOfFile(hFile); - } } } if (hFile != INVALID_HANDLE_VALUE32) /* We have a file */