Fix errant handling of specific-file deletion

This commit is contained in:
Chris Down 2018-03-11 20:24:37 -04:00
parent aae0e6e816
commit 0b003d4ad2

View file

@ -57,14 +57,10 @@ else
) )
if (( CM_REAL_DELETE )); then if (( CM_REAL_DELETE )); then
mapfile -t match_cksums < <(
for match in "${matches[@]}"; do cksum <<< "${line}"; done
)
flock -x -w "$lock_timeout" "$lock_fd" || exit flock -x -w "$lock_timeout" "$lock_fd" || exit
for match in "${matches[@]}"; do for match in "${matches[@]}"; do
ck=$(cksum <<< "$line") ck=$(cksum <<< "$match")
rm -f -- "$cache_dir/$ck" rm -f -- "$cache_dir/$ck"
done done