imag/lib/core
Matthias Beyer a07e03a25c Fix: Renaming entries should also remove the old entry
This is a bugfix for a bug in Store::move_entry_by_id():
The old entry was not removed after the new one was created.

The bug is a bit subtle. The issue was, that the internal cache held
open a reference to the old entry (as StoreEntry object) and when that
object got drop()ed, the contents of the entry were written to disk,
which resulted in the old entry being recreated.

This patch rewrites the function to behave well. The most critical part
is that we do not check whether the old entry is borrowed with
`hsmap.get()` but rather `hsmap.remove()`. The trick here is that the
`StoreEntry` object is dropped in the moment the check is done, clearing
the cached object and flushing it to the backend (the disk).
After that, we continue doing the filesystem operation and the cache is
clean.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26 09:57:05 +02:00
..
libimagerror Update dependency: ansi_term: 0.11.0 -> 0.12 2019-10-07 18:18:28 +02:00
libimagrt Fix: --override-config argument can be passed multiple times 2019-10-13 12:21:57 +02:00
libimagstore Fix: Renaming entries should also remove the old entry 2019-10-26 09:57:05 +02:00