From c02218223153b3022071e789def3fde8b556d6d6 Mon Sep 17 00:00:00 2001 From: Patrick Lam Date: Thu, 23 Mar 2006 04:21:10 +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 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; -- 2.39.5