Bug 6361 - FcAtomicReplaceOrig doesn't work on win32
Summary: FcAtomicReplaceOrig doesn't work on win32
Status: RESOLVED FIXED
Alias: None
Product: fontconfig
Classification: Unclassified
Component: library (show other bugs)
Version: 2.3
Hardware: x86 (IA32) Windows (All)
: high normal
Assignee: Keith Packard
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-23 14:25 UTC by Tim Evans
Modified: 2006-03-22 20:22 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Tim Evans 2006-03-23 14:25:57 UTC
On win32, unlike Posix, the 'rename' function does not overwrite existing files.
 FcAtomicReplaceOrig expects the Posix behaviour and will always fail under
win32.  This results in fontconfig being unable to replace existing
.fonts.cache-1 files.

The quick solution is to unlink the original file before the rename, but I'm not
sure if this is the correct solution as a failure could leave the original file
deleted and the new file not moved in to replace it.  There may not be better
solution.
Comment 1 Patrick Lam 2006-03-23 15:22:57 UTC
I've committed unlink-before-rename on Win32 to HEAD and branch.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.