mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 12:34:34 +08:00
FIX: don't restrict to local filesystem for df check
FIX: check correct directory when looking at backup limits
This commit is contained in:
@ -137,7 +137,7 @@ class Admin::BackupsController < Admin::AdminController
|
||||
private
|
||||
|
||||
def has_enough_space_on_disk?(size)
|
||||
`df -Pk . | awk 'NR==2 {print $4 * 1024;}'`.to_i > size
|
||||
`df -Pk #{Rails.root}/public/backups | awk 'NR==2 {print $4 * 1024;}'`.to_i > size
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user