util/disk_cache: check rename result
authorGrazvydas Ignotas <notasas@gmail.com>
Sat, 18 Mar 2017 20:58:55 +0000 (22:58 +0200)
committerTimothy Arceri <tarceri@itsqueeze.com>
Sun, 19 Mar 2017 21:24:46 +0000 (08:24 +1100)
commit274aaa331c969b998d5cf3f62015124297147ada
treeb7c436aaf0a22491d45072f5c513472c75ba2a0a
parent67911fa4b88aedc709a92c1630c1de9ea3a30d1f
util/disk_cache: check rename result

I haven't seen this causing problems in practice, but for correctness
we should also check if rename succeeded to avoid breaking accounting
and leaving a .tmp file behind.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/util/disk_cache.c