From 83f9848c42aaf7b31d8b7633fefe065c6374ae6d Mon Sep 17 00:00:00 2001 From: fmarier Date: Fri, 22 May 2009 02:53:00 +0000 Subject: [PATCH] MDL-19222 lib/setup: work-around the disk_free_space call failing on very large partitions --- lib/setup.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/setup.php b/lib/setup.php index 7274eeb700f..42574109f13 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -419,7 +419,10 @@ global $HTTPSPAGEREQUIRED; if (!file_exists($CFG->dataroot .'/sessions')) { make_upload_directory('sessions'); } - if (!(disk_free_space($CFG->dataroot.'/sessions') > 0)) { + // Need to disable debugging since disk_free_space() + // will fail on very large partitions (see MDL-19222) + $freespace = @disk_free_space($CFG->dataroot.'/sessions'); + if (!($freespace > 2048) and $freespace !== false) { echo ''; echo ''; echo '