mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-29 21:46:02 +00:00
only unlink if file exists
This commit is contained in:
parent
d354399c8a
commit
2fb0f8e24f
@ -2848,7 +2848,7 @@ static switch_status_t deliver_vm(vm_profile_t *profile,
|
|||||||
|
|
||||||
failed:
|
failed:
|
||||||
|
|
||||||
if (del_file && file_path) {
|
if (del_file && file_path && switch_file_exists(file_path, pool)) {
|
||||||
if (unlink(file_path) != 0) {
|
if (unlink(file_path) != 0) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to delete file [%s]\n", file_path);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to delete file [%s]\n", file_path);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user