Skip to content

Commit

Permalink
Fix missing check if original folder exits. In early stages when no f…
Browse files Browse the repository at this point in the history
…iles are handled. This folder does not exist
  • Loading branch information
Andreas Warnaar committed May 24, 2024
1 parent 1a04571 commit ddb19c6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions application/src/Controller/Admin/SystemInfoController.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,12 @@ private function getSystemInfo()
$info['Free space']['Local files'] = $this->formatSpace($freeSpaceFiles);
}
// Manage the case where directory "original" is mounted separately.
$freeSpaceOriginal = disk_free_space($freeSpaceFilesDir . '/original');
if ($freeSpaceFiles !== $freeSpaceOriginal) {
$info['Free space']['Local files (original)'] = $this->formatSpace($freeSpaceOriginal);
$freeSpaceOriginalDir = $freeSpaceFilesDir . '/original';
if(file_exists($freeSpaceOriginalDir)) {
$freeSpaceOriginal = disk_free_space($freeSpaceOriginalDir);
if ($freeSpaceFiles !== $freeSpaceOriginal) {
$info['Free space']['Local files (original)'] = $this->formatSpace($freeSpaceOriginal);
}
}
}
$freeSpaceTemp = disk_free_space($this->getDirTemp());
Expand Down

0 comments on commit ddb19c6

Please sign in to comment.