Improved file area deletion

This commit is contained in:
Michiel Broek
2001-12-08 15:31:17 +00:00
parent 09e5cd8230
commit 8ded931968
3 changed files with 58 additions and 3 deletions

View File

@@ -237,6 +237,15 @@ void Check(void)
chmod(fAreas, 0660);
iAreasNew++;
} else {
if (strlen(area.Name) == 0) {
sprintf(fAreas, "%s/fdb/fdb%d.data", getenv("MBSE_ROOT"), i);
if (unlink(fAreas) == 0) {
Syslog('+', "Removed obsolete %s", fAreas);
}
}
} /* if area.Available */
}