Check result of storage wrappers

This commit is contained in:
Robin Appelman 2015-08-28 20:48:42 +02:00
parent 114d1acd2c
commit 4cb8ca1860
1 changed files with 3 additions and 0 deletions

View File

@ -99,6 +99,9 @@ class StorageFactory implements IStorageFactory {
}, $wrappers);
foreach ($wrappers as $wrapper) {
$storage = $wrapper($mountPoint->getMountPoint(), $storage, $mountPoint);
if (!($storage instanceof \OCP\Files\Storage)) {
throw new \Exception('Invalid result from storage wrapper');
}
}
return $storage;
}