Check return of disk_free_space before returning it

Local changes copied from ed83597371
and 25370fcb82
remotes/origin/fix-10825
Joas Schilling 10 years ago
parent 1062f4fe44
commit c5427da76d
  1. 6
      lib/private/files/storage/mappedlocal.php

@ -292,7 +292,11 @@ class MappedLocal extends \OC\Files\Storage\Common {
}
public function free_space($path) {
return @disk_free_space($this->getSourcePath($path));
$space = @disk_free_space($this->getSourcePath($path));
if ($space === false || is_null($space)) {
return \OCP\Files\FileInfo::SPACE_UNKNOWN;
}
return $space;
}
public function search($query) {

Loading…
Cancel
Save