From: Patrick Lam Date: Thu, 23 Mar 2006 04:22:28 +0000 (+0000) Subject: On Windows, unlink before rename. Reported by Tim Evans. X-Git-Tag: 2.3.97~16 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ba76916ff64d476d5c5564e46a5d4209cb942864;p=fontconfig.git On Windows, unlink before rename. Reported by Tim Evans. --- 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;