Skip to content

Commit

Permalink
Fix operators to compare numerically, not lexicographically
Browse files Browse the repository at this point in the history
The operator < compares two strings lexicographically resulting in that a 100MB tomb is considered smaller than 47MB or 18MB.

Closes #489
  • Loading branch information
Sven Geuer authored and jaromil committed Sep 30, 2023
1 parent 0c8d4cf commit dcdf4cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tomb
Original file line number Diff line number Diff line change
Expand Up @@ -2162,13 +2162,13 @@ lock_tomb_with_key() {
ext3|ext4) ;;
ext3maxinodes|ext4maxinodes) ;;
btrfs)
if [[ $tombsize < 49283072 ]]; then
if [[ $tombsize -lt 49283072 ]]; then
_failure "Filesystem ::1 filesystem:: not supported on tombs smaller than 47MB." \
$filesystem
fi
;;
btrfsmixedmode)
if [[ $tombsize < 18874368 ]]; then
if [[ $tombsize -lt 18874368 ]]; then
_failure "Filesystem ::1 filesystem:: not supported on tombs smaller than 18MB." \
$filesystem
fi
Expand Down

0 comments on commit dcdf4cb

Please sign in to comment.