Commit c5427da7 authored by Joas Schilling's avatar Joas Schilling
Browse files

Check return of disk_free_space before returning it

Local changes copied from ed835973
and 25370fcb
parent 1062f4fe
...@@ -292,7 +292,11 @@ class MappedLocal extends \OC\Files\Storage\Common { ...@@ -292,7 +292,11 @@ class MappedLocal extends \OC\Files\Storage\Common {
} }
public function free_space($path) { 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) { public function search($query) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment