Back to the Vavoom Forum Archives
scen
Janis Legzdinsh
Index: utils/glvis/level.cpp =================================================================== --- utils/glvis/level.cpp (revision 1456) +++ utils/glvis/level.cpp (working copy) @@ -33,8 +33,6 @@ // MACROS ------------------------------------------------------------------ -#define TEMP_FILE "$glvis$$.$$$" - // TYPES ------------------------------------------------------------------- // EXTERNAL FUNCTION PROTOTYPES -------------------------------------------- @@ -864,6 +862,7 @@ { char filename[1024]; char destfile[1024]; + char tempfile[1024]; char bakext[8]; if (Owner.Malloc && Owner.Free) @@ -907,7 +906,10 @@ strcpy(bakext, ".~wa"); } - outwad.Open(TEMP_FILE, glwad->wadid); + strcpy(tempfile, destfile); + StripFilename(tempfile); + if (tempfile[0]) + strcat(tempfile, "/"); + strcat(tempfile, "$glvis$$.$$$"); + outwad.Open(tempfile, glwad->wadid); // Process lumps if (mainwad == glwad) @@ -931,7 +933,7 @@ strcat(filename, bakext); remove(filename); rename(destfile, filename); - rename(TEMP_FILE, destfile); + rename(tempfile, destfile); } } // namespace VavoomUtils