Fix operators to compare numerically, not lexicographically

The operator < compares two strings lexicographically resulting in that a 100MB tomb is considered smaller than 47MB or 18MB.

Closes #489
This commit is contained in:
Sven Geuer 2023-09-30 22:39:35 +02:00 committed by Jaromil
parent 0c8d4cf477
commit dcdf4cb3bb
1 changed files with 2 additions and 2 deletions

4
tomb
View File

@ -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