Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions lib/ACL/ACLStorageWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,8 @@ public function getDirectDownload($path): array|false {
return parent::getDirectDownload($path);
}

public function getDirectoryContent($directory): \Traversable|false {
public function getDirectoryContent($directory): \Traversable {
$content = $this->getWrapperStorage()->getDirectoryContent($directory);
if ($content === false) {
return false;
}
foreach ($content as $data) {
$data['scan_permissions'] ??= $data['permissions'];
$data['permissions'] &= $this->getACLPermissionsForPath(rtrim($directory, '/') . '/' . $data['name']);
Expand Down
6 changes: 0 additions & 6 deletions tests/stubs/oc_files_node_lazyfolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ public function unMount($mount)
{
}

/**
* @inheritDoc
*/
public function get($path)
{
}
Expand Down Expand Up @@ -362,9 +359,6 @@ public function getDirectoryListing()
{
}

/**
* @inheritDoc
*/
public function nodeExists($path)
{
}
Expand Down
4 changes: 4 additions & 0 deletions tests/stubs/oc_files_objectstore_objectstorestorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,9 @@ public function completeChunkedWrite(string $targetPath, string $writeToken): in

public function cancelChunkedWrite(string $targetPath, string $writeToken): void
{
}

public function setPreserveCacheOnDelete(bool $preserve)
{
}
}
3 changes: 2 additions & 1 deletion tests/stubs/oc_files_storage_common.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use OC\Files\Cache\Watcher;
use OC\Files\FilenameValidator;
use OC\Files\Filesystem;
use OC\Files\ObjectStore\ObjectStoreStorage;
use OC\Files\Storage\Wrapper\Jail;
use OC\Files\Storage\Wrapper\Wrapper;
use OCP\Files\Cache\ICache;
Expand Down Expand Up @@ -319,7 +320,7 @@ public function writeStream(string $path, $stream, ?int $size = null): int
{
}

public function getDirectoryContent($directory): \Traversable|false
public function getDirectoryContent($directory): \Traversable
{
}
}
2 changes: 1 addition & 1 deletion tests/stubs/oc_files_storage_storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function getMetaData($path): ?array
* - storage_mtime
* - permissions
*/
public function getDirectoryContent($directory): \Traversable|false
public function getDirectoryContent($directory): \Traversable
{
}
}
2 changes: 1 addition & 1 deletion tests/stubs/oc_files_storage_wrapper_jail.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public function writeStream(string $path, $stream, ?int $size = null): int
{
}

public function getDirectoryContent($directory): \Traversable|false
public function getDirectoryContent($directory): \Traversable
{
}
}
2 changes: 1 addition & 1 deletion tests/stubs/oc_files_storage_wrapper_wrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public function writeStream(string $path, $stream, ?int $size = null): int
{
}

public function getDirectoryContent($directory): \Traversable|false
public function getDirectoryContent($directory): \Traversable
{
}

Expand Down