From 96812eb2803b1fa99924cd5ecf26f8d846c99fa2 Mon Sep 17 00:00:00 2001 From: Ferenc Wagner Date: Tue, 29 Mar 2005 19:51:49 +0000 Subject: [PATCH] Try using a stable temporary directory at first to silence ZoneAlarm warnings. --- programs/winetest/main.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/programs/winetest/main.c b/programs/winetest/main.c index 4ac9ae360fa..7ca75e0bede 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -432,7 +432,7 @@ char * run_tests (char *logname, const char *tag) { int nr_of_files = 0, nr_of_tests = 0, i; - char *tempdir; + char *tempdir, *shorttempdir; int logfile; char *strres, *eol, *nextline; DWORD strsize; @@ -459,9 +459,17 @@ run_tests (char *logname, const char *tag) tempdir = tempnam (0, "wct"); if (!tempdir) report (R_FATAL, "Can't name temporary dir (check %%TEMP%%)."); - report (R_DIR, tempdir); - if (!CreateDirectory (tempdir, NULL)) + shorttempdir = strdup (tempdir); + if (shorttempdir) { /* try stable path for ZoneAlarm */ + strstr (shorttempdir, "wct")[3] = 0; + if (CreateDirectoryA (shorttempdir, NULL)) { + free (tempdir); + tempdir = shorttempdir; + } else free (shorttempdir); + } + if (tempdir != shorttempdir && !CreateDirectoryA (tempdir, NULL)) report (R_FATAL, "Could not create directory: %s", tempdir); + report (R_DIR, tempdir); xprintf ("Version 3\n"); strres = extract_rcdata (WINE_BUILD, STRINGRES, &strsize);