868808e74a74ee59ebd252650cfaed8d8b741a82 kent Sun Jan 19 18:06:17 2014 -0800 Adding mustRemove wrapper around remove. diff --git src/lib/osunix.c src/lib/osunix.c index 7bb2bd7..2a9a85a 100644 --- src/lib/osunix.c +++ src/lib/osunix.c @@ -357,30 +357,38 @@ dir, lastSlash, x, i, suffix); if (!fileExists(fileName)) break; } return fileName; } void mustRename(char *oldName, char *newName) /* Rename file or die trying. */ { int err = rename(oldName, newName); if (err < 0) errnoAbort("Couldn't rename %s to %s", oldName, newName); } +void mustRemove(char *path) +/* Remove file or die trying */ +{ +int err = remove(path); +if (err < 0) + errnoAbort("Couldn't remove %s", path); +} + static void eatSlashSlashInPath(char *path) /* Convert multiple // to single // */ { char *s, *d; s = d = path; char c, lastC = 0; while ((c = *s++) != 0) { if (c == '/' && lastC == c) continue; *d++ = c; lastC = c; } *d = 0; }