rename() cannot replace existing files on Windows.
authorGuus Sliepen <guus@tinc-vpn.org>
Fri, 5 Jan 2007 05:44:01 +0000 (05:44 +0000)
committerGuus Sliepen <guus@tinc-vpn.org>
Fri, 5 Jan 2007 05:44:01 +0000 (05:44 +0000)
src/graph.c

index be6080e07ad97b8002f681b37cadae7537cd51ff..1f006606a87561e497e9dc164510c81494534ffc 100644 (file)
@@ -374,6 +374,9 @@ void dump_graph(void)
                pclose(file);
        } else {
                fclose(file);
+#ifdef HAVE_MINGW
+               unlink(filename);
+#endif
                rename(tmpname, filename);
                free(tmpname);
        }