summaryrefslogtreecommitdiffstats
path: root/lib/files
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-03-14 17:00:30 +0100
committerRobin Appelman <icewind@owncloud.com>2013-03-14 17:00:30 +0100
commited8359737199a8a6640986e00df80d971aa6e1d7 (patch)
tree7bc6fb9d73092f8d0320db3169c0fa8c4ff4770b /lib/files
parentabe408e934d1620a500d9be365e265c9fd635b27 (diff)
downloadnextcloud-server-ed8359737199a8a6640986e00df80d971aa6e1d7.tar.gz
nextcloud-server-ed8359737199a8a6640986e00df80d971aa6e1d7.zip
Return unknown freespace if the free_space call failed
Fixes #2312
Diffstat (limited to 'lib/files')
-rw-r--r--lib/files/storage/local.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/files/storage/local.php b/lib/files/storage/local.php
index da6597c8057..7b637a97059 100644
--- a/lib/files/storage/local.php
+++ b/lib/files/storage/local.php
@@ -218,7 +218,11 @@ class Local extends \OC\Files\Storage\Common{
}
public function free_space($path) {
- return @disk_free_space($this->datadir.$path);
+ $space = @disk_free_space($this->datadir.$path);
+ if($space === false){
+ return \OC\Files\FREE_SPACE_UNKNOWN;
+ }
+ return $space;
}
public function search($query) {