Skip to content

Commit 14b1ed4

Browse files
committed
Utility: Fix clash with windows API
1 parent 9518c3b commit 14b1ed4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Src/Setup/Utility/ManualUninstall.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@
3030
#ifdef SAFE_MODE
3131
#define RegDeleteTree2(x,y) 5
3232
#define RegDeleteValue2(x,y) 5
33-
#define DeleteFile2(x) (SetLastError(3), FALSE)
33+
#define DeleteFile3(x) (SetLastError(3), FALSE)
3434
#define MoveFileEx2(x,y,z) (SetLastError(5), FALSE)
3535
#define SHFileOperation2(x) 0x78
36-
#define RemoveDirectory2(x) FALSE
36+
#define RemoveDirectory3(x) FALSE
3737
#else
3838
#define RegDeleteTree2(x,y) RegDeleteTree(x,y)
3939
#define RegDeleteValue2(x,y) RegDeleteValue(x,y)
40-
#define DeleteFile2(x) DeleteFile(x)
40+
#define DeleteFile3(x) DeleteFile(x)
4141
#define MoveFileEx2(x,y,z) MoveFileEx(x,y,z)
4242
#define SHFileOperation2(x) SHFileOperation(x)
43-
#define RemoveDirectory2(x) RemoveDirectory(x)
43+
#define RemoveDirectory3(x) RemoveDirectory(x)
4444
#endif
4545

4646
// files to delete from the Open-Shell folder
@@ -777,7 +777,7 @@ static bool DeleteFileEx( const wchar_t *fname, bool bAllowDelay )
777777
if (attribs&FILE_ATTRIBUTE_READONLY)
778778
SetFileAttributes(fname,attribs&~FILE_ATTRIBUTE_READONLY);
779779
LogMessage(-1,L"Deleting file %s",fname);
780-
if (!DeleteFile2(fname))
780+
if (!DeleteFile3(fname))
781781
{
782782
int error=GetLastError();
783783
if (error==ERROR_ACCESS_DENIED && bAllowDelay)
@@ -826,7 +826,7 @@ static void DeleteDirectoryEx( const wchar_t *path, bool bDelay )
826826
else
827827
{
828828
LogMessage(-1,L"Deleting directory %s",path);
829-
if (!RemoveDirectory2(path))
829+
if (!RemoveDirectory3(path))
830830
{
831831
int error=GetLastError();
832832
bool bOldHasErrors=g_bHasErrors;

0 commit comments

Comments
 (0)