don't delete file if its the same file

This commit is contained in:
Michael Jerris 2011-09-15 10:48:37 -04:00
parent 6310318cad
commit 61dd9c0765
1 changed files with 5 additions and 1 deletions

View File

@ -570,7 +570,11 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to,
char cmd[1024] = "";
switch_snprintf(cmd, sizeof(cmd), "%s %s %s", convert_cmd, file, newfile);
switch_system(cmd, SWITCH_TRUE);
file = newfile;
if (strcmp(file, newfile)) {
file = newfile;
} else {
switch_safe_free(newfile);
}
}
switch_safe_free(dupfile);