1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-03 11:11:20 +00:00

Properly check if the target .EXE can be replaced (no ide compilation).

This commit is contained in:
FellippeHeitor 2016-06-25 16:17:22 -03:00
parent 1e99a91293
commit d8c01d89cb

View file

@ -11312,10 +11312,10 @@ IF idemode = 0 AND No_C_Compile_Mode = 0 THEN
ELSE
PRINT "COMPILING C++ CODE INTO EXE..."
END IF
IF _FILEEXISTS(file$ + extension$) THEN
IF _FILEEXISTS(path.exe$ + file$ + extension$) THEN
E = 0
ON ERROR GOTO qberror_test
KILL file$ + extension$
KILL path.exe$ + file$ + extension$
ON ERROR GOTO qberror
IF E = 1 THEN
a$ = "CANNOT CREATE " + CHR$(34) + file$ + extension$ + CHR$(34) + " BECAUSE THE FILE IS ALREADY IN USE!": GOTO errmes