From 586b18916660a10f43ff533f86f474cd50ecfcc4 Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Sat, 15 Mar 2014 18:01:03 -0500 Subject: [PATCH] FS-6355 fix for windows delete file --- src/switch_xml.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/switch_xml.c b/src/switch_xml.c index 7ebe734264..670187d5fb 100644 --- a/src/switch_xml.c +++ b/src/switch_xml.c @@ -1642,6 +1642,9 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_parse_file(const char *file) if (preprocess(SWITCH_GLOBAL_dirs.conf_dir, file, write_fd, 0) > -1) { fclose(write_fd); write_fd = NULL; + if ( unlink (new_file)) { + goto done; + } if ( rename(new_file_tmp,new_file) ) { goto done; }