Skip to content

Commit

Permalink
Fix errant handling of specific-file deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
cdown committed Mar 12, 2018
1 parent aae0e6e commit 0b003d4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions clipdel
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,10 @@ else
)

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

for match in "${matches[@]}"; do
ck=$(cksum <<< "$line")
ck=$(cksum <<< "$match")
rm -f -- "$cache_dir/$ck"
done

Expand Down

0 comments on commit 0b003d4

Please sign in to comment.