]> arthur.barton.de Git - bup.git/commit - lib/bup/cmd/save.py
save: fix symlink target race
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 31 Dec 2020 22:33:03 +0000 (23:33 +0100)
committerRob Browning <rlb@defaultvalue.org>
Sat, 15 May 2021 19:08:32 +0000 (14:08 -0500)
commit3bf8fc01f872274283a133cda0e77bbc59f7009e
tree2accdf282253d718d9d4d5ce411081f8a76e7689
parentbbd78609bef5fdd5394de9945336a807c74079fe
save: fix symlink target race

If the symlink target changes while save is running, we can end up
reading one target and recording it in the metadata, but then
recording a different one (with perhaps a different size) in the
blob.

Fix this by not reading the symlink again, but just using the one
we already have in the metadata.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/cmd/save.py