BUGFIX: fix math & unit when checking disk space

This commit is contained in:
Régis Hanol 2014-02-27 16:55:12 +01:00
parent 6745422058
commit 70ca6171d1
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ class Admin::BackupsController < Admin::AdminController
private
def has_enough_space_on_disk?(size)
`df -l . | tail -1 | tr -s ' ' | cut -d ' ' -f 4`.to_i > size
`df -l -B 1K . | tail -1 | tr -s ' ' | cut -d ' ' -f 4`.to_i > size / 1024
end
end