FIX: Allow for large free disk space

reported via @envygeeks shift multiplication of free space out of awk and into rube

awk on some systems appears to be converting stuff to floats.
This commit is contained in:
Sam 2016-01-25 13:22:36 +11:00
parent 7138b74110
commit ee823305a1

View file

@ -57,7 +57,7 @@ class DiskSpace
protected
def self.free(path)
`df -Pk #{path} | awk 'NR==2 {print $4 * 1024;}'`.to_i
`df -Pk #{path} | awk 'NR==2 {print $4;}'`.to_i * 1024
end
def self.used(path)