Skip to content

Commit

Permalink
MDL-19222 lib/setup: work-around the disk_free_space call failing on …
Browse files Browse the repository at this point in the history
…very large partitions
  • Loading branch information
fmarier committed May 22, 2009
1 parent cf9faae commit 83f9848
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,10 @@
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 '<html><body>';
echo '<table align="center"><tr>';
echo '<td style="color:#990000; text-align:center; font-size:large; border-width:1px; '.
Expand Down

0 comments on commit 83f9848

Please sign in to comment.