diff --git a/lib/private/Lockdown/Filesystem/NullStorage.php b/lib/private/Lockdown/Filesystem/NullStorage.php
index 967b6d2c6e777c5a6cf4e4adcf9db1bdb1c5ded6..ea911b900649430e276849bac22b75d075da2e24 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 dc99eb4c03aa8c236fe29dc7c113109ac4a332a4..c6faf325cd43f93d92533833d312410735387c67 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() {