Skip to content
Snippets Groups Projects
Commit ed4633a5 authored by Joas Schilling's avatar Joas Schilling Committed by GitHub
Browse files

Merge pull request #3408 from nextcloud/nullstorage-free-space

return unknown free space from nullstorage
parents 51f0555b 5e408aeb
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
......@@ -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() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment