On Windows, unlink before rename. Reported by Tim Evans.
This commit is contained in:
parent
04af4f56dc
commit
c022182231
|
@ -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>
|
2006-03-15 Patrick Lam <plam@mit.edu>
|
||||||
* fc-lang/ab.orth:
|
* fc-lang/ab.orth:
|
||||||
* fc-lang/ibo.orth:
|
* fc-lang/ibo.orth:
|
||||||
|
|
|
@ -177,6 +177,9 @@ FcAtomicOrigFile (FcAtomic *atomic)
|
||||||
FcBool
|
FcBool
|
||||||
FcAtomicReplaceOrig (FcAtomic *atomic)
|
FcAtomicReplaceOrig (FcAtomic *atomic)
|
||||||
{
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
|
unlink (atomic->file);
|
||||||
|
#endif
|
||||||
if (rename ((char *) atomic->new, (char *) atomic->file) < 0)
|
if (rename ((char *) atomic->new, (char *) atomic->file) < 0)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
return FcTrue;
|
return FcTrue;
|
||||||
|
|
Loading…
Reference in New Issue