From ba76916ff64d476d5c5564e46a5d4209cb942864 Mon Sep 17 00:00:00 2001 From: Patrick Lam Date: Thu, 23 Mar 2006 04:22:28 +0000 Subject: [PATCH] On Windows, unlink before rename. Reported by Tim Evans. --- ChangeLog | 5 +++++ src/fcatomic.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index b969083..1e86386 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-03-22 Patrick Lam + * src/fcatomic.c: + + On Windows, unlink before rename. Reported by Tim Evans. + 2006-03-08 Egmont Koblinger reviewed by: plam diff --git a/src/fcatomic.c b/src/fcatomic.c index a8487f3..a8b30f8 100644 --- a/src/fcatomic.c +++ b/src/fcatomic.c @@ -177,6 +177,9 @@ FcAtomicOrigFile (FcAtomic *atomic) FcBool FcAtomicReplaceOrig (FcAtomic *atomic) { +#ifdef _WIN32 + unlink (atomic->file); +#endif if (rename ((char *) atomic->new, (char *) atomic->file) < 0) return FcFalse; return FcTrue;