switch_file_exists returns switch_status_t so you cannot assume it returns a true value since success is 0
This commit is contained in:
parent
3d283accf2
commit
cecaa556c3
|
@ -1324,7 +1324,7 @@ static void cleanup_attachments(client_t *client)
|
|||
|
||||
for (hp = client->params->headers; hp; hp = hp->next) {
|
||||
if (!strncasecmp(hp->name, "attach_file:", 12)) {
|
||||
if (switch_file_exists(hp->value, client->pool)) {
|
||||
if (switch_file_exists(hp->value, client->pool) == SWITCH_STATUS_SUCCESS) {
|
||||
printf("DELETE %s\n", hp->value);
|
||||
unlink(hp->value);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue