Skip to content

Commit

Permalink
aud_only: fix single file to remove bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rdavid committed Aug 4, 2024
1 parent 8f51f46 commit 4d32af7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ aud_only() {
loge "$lst"
return $err
}
[ -z "$lst" ] && {
log Nothing to remove.
return 0
}

# xargs handles white spaces.
cnt="$(printf %s "$lst" | wc -l | xargs)" || {
cnt="$(printf %s\\n "$lst" | wc -l | xargs)" || {
err=$?
loge Something went wrong.
return $err
}
[ "$cnt" = 0 ] && {
log Nothing to remove.
return 0
}
base_should_continue "Remove the following files:
$lst
Total $cnt files" || return 0
Expand Down

0 comments on commit 4d32af7

Please sign in to comment.