mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 07:55:44 +08:00
BUGFIX: couldn't upload backup on OSX
--B is not a valid df option on OSX
This commit is contained in:
@ -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 -B 1K . | tail -1 | tr -s ' ' | cut -d ' ' -f 4`.to_i > size / 1024
|
`df -Pk . | awk 'NR==2 {print $4 * 1024;}'`.to_i > size
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user