Merge pull request #2318 from owncloud/unkown-freespace

Return unknown freespace if the free_space call failed
This commit is contained in:
Bernhard Posselt 2013-03-14 14:05:18 -07:00
commit 1da6f79d3b
1 changed files with 5 additions and 1 deletions

View File

@ -218,7 +218,11 @@ class Local extends \OC\Files\Storage\Common{
} }
public function free_space($path) { 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) { public function search($query) {