From ca9f6e91370fe4b9bc89e837df88e70fc497f2b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Fri, 28 Feb 2014 15:43:50 +0100 Subject: [PATCH] BUGFIX: couldn't upload backup on OSX --B is not a valid df option on OSX --- app/controllers/admin/backups_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/backups_controller.rb b/app/controllers/admin/backups_controller.rb index 657b5f7ffd1..9bc6d779a60 100644 --- a/app/controllers/admin/backups_controller.rb +++ b/app/controllers/admin/backups_controller.rb @@ -135,7 +135,7 @@ class Admin::BackupsController < Admin::AdminController private 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