Fix for create toberep.data

This commit is contained in:
Michiel Broek
2004-05-12 13:15:13 +00:00
parent 0deb4ed4cb
commit 5734f08d5d
2 changed files with 9 additions and 4 deletions

View File

@@ -49,9 +49,13 @@ int Add_ToBeRep(struct _filerecord report)
fname = calloc(PATH_MAX, sizeof(char));
sprintf(fname, "%s/etc/toberep.data", getenv("MBSE_ROOT"));
if ((tbr = fopen(fname, "r+")) == NULL) {
WriteError("$Can't create %s", fname);
free(fname);
return FALSE;
if ((tbr = fopen(fname, "a+")) == NULL) {
WriteError("$Can't create %s", fname);
free(fname);
return FALSE;
} else {
Syslog('f', "Created new %s", fname);
}
}
free(fname);