fail CopyFile of uninstaller in case it already exists

this prevents a race condition where Au_.exe is deleted by the current uninstaller and created by another uninstaller before CopyFile is called


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4940 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-02-17 15:40:49 +00:00
parent 9478452590
commit 36b75d38b8

View file

@ -221,7 +221,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
if (!lstrcmpi(ibuf+l-(sizeof(s)-2),s+1)) break;
// copy file
if (CopyFile(ibuf,buf2+1,FALSE))
if (CopyFile(ibuf,buf2+1,TRUE))
{
HANDLE hProc;
#ifdef NSIS_SUPPORT_MOVEONREBOOT