]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - test.c
Merge branch 'master' into threading
[xonotic/gmqcc.git] / test.c
diff --git a/test.c b/test.c
index 2672cb6a93fa955cf6f772d49ec41348aa1789a6..c415fb87b72dba8f076cbea8a63e043fd39837f0 100644 (file)
--- a/test.c
+++ b/test.c
@@ -152,6 +152,7 @@ static int task_pclose(fs_file_t **handles) {
     return status;
 }
 #else
+    #include <sys/stat.h>
     typedef struct {
         fs_file_t *handles[3];
         char       name_err[L_tmpnam];
@@ -744,7 +745,7 @@ static bool task_propagate(const char *curdir, size_t *pad, const char *defs) {
                  * so we don't trample over an existing one.
                  */
                 tmpl->tempfilename = NULL;
-                util_asprintf(&tmpl->tempfilename, "%s/TMPDAT.%s", directories[i], files->d_name);
+                util_asprintf(&tmpl->tempfilename, "%s/TMPDAT.%s.dat", directories[i], files->d_name);
 
                 /*
                  * Additional QCFLAGS enviroment variable may be used
@@ -878,7 +879,8 @@ static void task_precleanup(const char *curdir) {
     while ((files = fs_dir_read(dir))) {
         if (strstr(files->d_name, "TMP")     ||
             strstr(files->d_name, ".stdout") ||
-            strstr(files->d_name, ".stderr"))
+            strstr(files->d_name, ".stderr") ||
+            strstr(files->d_name, ".dat"))
         {
             util_snprintf(buffer, sizeof(buffer), "%s/%s", curdir, files->d_name);
             if (remove(buffer))