BUGFIX: fix math & unit when checking disk space
This commit is contained in:
parent
6745422058
commit
70ca6171d1
|
@ -135,7 +135,7 @@ class Admin::BackupsController < Admin::AdminController
|
||||||
private
|
private
|
||||||
|
|
||||||
def has_enough_space_on_disk?(size)
|
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
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue