提交 2fb0f8e2 authored 作者: Anthony Minessale's avatar Anthony Minessale

only unlink if file exists

上级 d354399c
...@@ -2848,7 +2848,7 @@ static switch_status_t deliver_vm(vm_profile_t *profile, ...@@ -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);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论