]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6355 fix for windows delete file
authorJeff Lenk <jeff@jefflenk.com>
Sat, 15 Mar 2014 23:01:03 +0000 (18:01 -0500)
committerJeff Lenk <jeff@jefflenk.com>
Sat, 15 Mar 2014 23:01:03 +0000 (18:01 -0500)
src/switch_xml.c

index 7ebe7342647ae9d3fcfc467539f0fe41ab9e74b5..670187d5fb3db8ec5920114a21dcd37248c8b944 100644 (file)
@@ -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;
                }