On Windows, unlink before rename. Reported by Tim Evans.

This commit is contained in:
Patrick Lam 2006-03-23 04:22:28 +00:00
parent d8fda87d5e
commit ba76916ff6
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2006-03-22 Patrick Lam <plam@mit.edu>
* src/fcatomic.c:
On Windows, unlink before rename. Reported by Tim Evans.
2006-03-08 Egmont Koblinger <egmont@uhulinux.hu>
reviewed by: plam

View File

@ -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;