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

This commit is contained in:
Patrick Lam 2006-03-23 04:21:10 +00:00
parent 04af4f56dc
commit c022182231
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-15 Patrick Lam <plam@mit.edu>
* fc-lang/ab.orth:
* fc-lang/ibo.orth:

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;