Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-02-16 19:53:06 +0300
committerGitHub <noreply@github.com>2017-02-16 19:53:06 +0300
commitc868e373464d2fedd17a9436d52527b6a3737427 (patch)
treed36d297094e0cbbfb90ec29877cd7a25d82c0bf8
parent8296f1a35bac0aede08c33d10233d1ee3bf0e15a (diff)
parent131945593ed4c8d254d1c13eb2380be8184ec4df (diff)
Merge pull request #3508 from nextcloud/nullstorage-free-space-11
[11] return unknown free space from nullstorage
-rw-r--r--lib/private/Lockdown/Filesystem/NullStorage.php3
-rw-r--r--tests/lib/Lockdown/Filesystem/NullStorageTest.php3
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/Lockdown/Filesystem/NullStorage.php b/lib/private/Lockdown/Filesystem/NullStorage.php
index 967b6d2c6e7..ea911b90064 100644
--- a/lib/private/Lockdown/Filesystem/NullStorage.php
+++ b/lib/private/Lockdown/Filesystem/NullStorage.php
@@ -20,6 +20,7 @@
namespace OC\Lockdown\Filesystem;
use Icewind\Streams\IteratorDirectory;
+use OC\Files\FileInfo;
use OC\Files\Storage\Common;
class NullStorage extends Common {
@@ -128,7 +129,7 @@ class NullStorage extends Common {
}
public function free_space($path) {
- return 0;
+ return FileInfo::SPACE_UNKNOWN;
}
public function touch($path, $mtime = null) {
diff --git a/tests/lib/Lockdown/Filesystem/NullStorageTest.php b/tests/lib/Lockdown/Filesystem/NullStorageTest.php
index dc99eb4c03a..c6faf325cd4 100644
--- a/tests/lib/Lockdown/Filesystem/NullStorageTest.php
+++ b/tests/lib/Lockdown/Filesystem/NullStorageTest.php
@@ -27,6 +27,7 @@ use Icewind\Streams\IteratorDirectory;
use OC\ForbiddenException;
use OC\Lockdown\Filesystem\NullCache;
use OC\Lockdown\Filesystem\NullStorage;
+use OC\Files\FileInfo;
use OCP\Files\Storage;
use Test\TestCase;
@@ -182,7 +183,7 @@ class NullStorageTest extends TestCase {
}
public function testFree_space() {
- $this->assertSame(0, $this->storage->free_space('foo'));
+ $this->assertSame(FileInfo::SPACE_UNKNOWN, $this->storage->free_space('foo'));
}
public function testTouch() {