Skip to content

get_free_space: always return an integer

clayton craft requested to merge fix-get_free_space into master

Fixes an issue introduced in 783a9c40, where get_free_space would return a float but none of the other comparisons, etc in the app would deal with the float appropriately. Dealing with floats for comparisons is annoying... for example: [ (echo "foo > 123" | bc) -eq 1 ] && whatever

This change just floors the free space value, which means it might be slightly off from actual (by less than a byte...), but it allows us to avoid overly complicated code for comparing to it.

This also removed an old comment that is no longer relevant.

Merge request reports