From: Patrick Lam Date: Thu, 23 Mar 2006 04:21:10 +0000 (+0000) Subject: On Windows, unlink before rename. Reported by Tim Evans. X-Git-Tag: fc-2_3_95~34 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=c02218223153b3022071e789def3fde8b556d6d6;p=fontconfig.git On Windows, unlink before rename. Reported by Tim Evans. --- diff --git a/ChangeLog b/ChangeLog index 4db51b3..3d8e30c 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-15 Patrick Lam * fc-lang/ab.orth: * fc-lang/ibo.orth: 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;