From 70ca6171d1621bcc60b40f2a09c65730f2960391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= <regis@hanol.fr> Date: Thu, 27 Feb 2014 16:55:12 +0100 Subject: [PATCH] BUGFIX: fix math & unit when checking disk space --- 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 0ef801a8198..657b5f7ffd1 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 . | 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