compile, wip

This commit is contained in:
maliakal_d 2022-04-04 12:41:30 +02:00
parent 0309eba3c6
commit 45f57ebeb7

View File

@ -653,13 +653,13 @@ int deleteFile(char *mess, char *fname, char *errorPrefix) {
LOG(logERROR, (mess)); LOG(logERROR, (mess));
return FAIL; return FAIL;
} }
}
if (access(fullname, F_OK) == 0) { if (access(fullname, F_OK) == 0) {
char cmd[MAX_STR_LENGTH] = {0}; char cmd[MAX_STR_LENGTH] = {0};
char retvals[MAX_STR_LENGTH] = {0}; char retvals[MAX_STR_LENGTH] = {0};
if (snprintf(cmd, MAX_STR_LENGTH, "rm %s", fullname) >= MAX_STR_LENGTH) { if (snprintf(cmd, MAX_STR_LENGTH, "rm %s", fullname) >=
MAX_STR_LENGTH) {
sprintf(mess, "Could not %s. Command to delete is too long\n", sprintf(mess, "Could not %s. Command to delete is too long\n",
errorPrefix); errorPrefix);
LOG(logERROR, (mess)); LOG(logERROR, (mess));
@ -667,8 +667,9 @@ if (access(fullname, F_OK) == 0) {
} }
if (executeCommand(cmd, retvals, logDEBUG1) == FAIL) { if (executeCommand(cmd, retvals, logDEBUG1) == FAIL) {
snprintf(mess, MAX_STR_LENGTH, "Could not %s. (deleting file %s). %s\n", snprintf(mess, MAX_STR_LENGTH,
errorPrefix, fullname, retvals); "Could not %s. (deleting file %s). %s\n", errorPrefix,
fullname, retvals);
LOG(logERROR, (mess)); LOG(logERROR, (mess));
return FAIL; return FAIL;
} }