The avatar cache is using not-atomic operation to store the image on-disk. This means when an avatar is updated, if more than on process is tracking its avatar data, they will both write the data into the cache at the same time. This is racy. For now we could just create a QTemporaryFile then rename it. It's probably not 100% portable, but long-term solution is doing the cache in CM as said in bug #33410
Otherwise simple enough, but QFile::rename doesn't overwrite existing files. Looking at how similar tasks are implemented in KDE libraries could be a reasonable step forward.
Patch: http://git.collabora.co.uk/?p=user/xclaesse/telepathy-qt4.git;a=shortlog;h=refs/heads/atomic-write I have to disable autoremove otherwise it remove the renamed file too :(
Branch merged.
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.