summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-11-27 11:42:49 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-11-27 14:59:08 +0100
commitc5427da76d6d01fe9967204d3c019b493ceae6b9 (patch)
tree312898e6e0caad137681913be56d47ff2402ace8 /lib
parent1062f4fe44229ad186df35729487d3d0f6785682 (diff)
downloadnextcloud-server-c5427da76d6d01fe9967204d3c019b493ceae6b9.tar.gz
nextcloud-server-c5427da76d6d01fe9967204d3c019b493ceae6b9.zip
Check return of disk_free_space before returning it
Local changes copied from ed8359737199a8a6640986e00df80d971aa6e1d7 and 25370fcb8235d2129cab0f8a5843c4784b3673d0
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/storage/mappedlocal.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/files/storage/mappedlocal.php b/lib/private/files/storage/mappedlocal.php
index 6745dad77f2..e1d234dda13 100644
--- a/lib/private/files/storage/mappedlocal.php
+++ b/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) {