4ddb5c55d4f4e8ad0375aab9bb2fad80d39b4c40 galt Mon Apr 24 16:34:06 2017 -0700 refs #17358. Improves trash file touching for multi-region custom bed regions temp files. diff --git src/lib/obscure.c src/lib/obscure.c index 19051a7..5f53b6f 100644 --- src/lib/obscure.c +++ src/lib/obscure.c @@ -894,15 +894,29 @@ strLower(lower); char *conflict = hashFindVal(hash, lower); if (conflict) { if (sameString(conflict,s)) errAbort("Duplicate symbol %s", s); else errAbort("Conflict between symbols with different cases: %s vs %s", conflict, s); } hashAdd(hash, lower, s); } hashFree(&hash); } +boolean readAndIgnore(char *fileName) +/* Read a byte from fileName, so its access time is updated. */ +{ +boolean ret = FALSE; +char buf[256]; +FILE *f = fopen(fileName, "r"); +if ( f && (fread(buf, 1, 1, f) == 1 ) ) + ret = TRUE; +if (f) + fclose(f); +return ret; +} + +