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
path: root/apps
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-01-10 13:36:51 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2022-01-14 17:16:54 +0300
commit73e402f71517dbccf686fc9053126bc377080f72 (patch)
tree1763fabf4a06c3131f808d404783d0846a350cdc /apps
parenta735773d71b12805df9fe099c5b2f531df627c5d (diff)
Add helper method in Wrapper
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps')
-rw-r--r--apps/workflowengine/lib/Check/FileSystemTags.php17
1 files changed, 5 insertions, 12 deletions
diff --git a/apps/workflowengine/lib/Check/FileSystemTags.php b/apps/workflowengine/lib/Check/FileSystemTags.php
index d8377be91db..5312c763ec7 100644
--- a/apps/workflowengine/lib/Check/FileSystemTags.php
+++ b/apps/workflowengine/lib/Check/FileSystemTags.php
@@ -68,11 +68,6 @@ class FileSystemTags implements ICheck, IFileCheck {
* @return bool
*/
public function executeCheck($operator, $value) {
- if (str_starts_with($this->path, '__groupfolders')) {
- // System tags are always empty in this case and executeCheck is called
- // a second time with the jailedPath
- return false;
- }
$systemTags = $this->getSystemTags();
return ($operator === 'is') === in_array($value, $systemTags);
}
@@ -138,13 +133,11 @@ class FileSystemTags implements ICheck, IFileCheck {
// Special implementation for groupfolder since all groupfolders share the same storage
// id so add the group folder id in the cache key too.
$groupFolderStorage = $this->storage;
- $groupFolderStorageClass = \OCA\GroupFolders\Mount\GroupFolderStorage::class;
- while ($groupFolderStorage->instanceOfStorage(Wrapper::class)) {
- if ($groupFolderStorage instanceof $groupFolderStorageClass) {
- break;
- }
- /** @var Wrapper $groupFolderStorage */
- $groupFolderStorage = $groupFolderStorage->getWrapperStorage();
+ if ($this->storage instanceof Wrapper) {
+ $groupFolderStorage = $this->storage->getInstanceOfStorage(\OCA\GroupFolders\Mount\GroupFolderStorage::class);
+ }
+ if ($groupFolderStorage === null) {
+ throw new \LogicException('Should not happen: Storage is instance of GroupFolderStorage but no group folder storage found while unwrapping.');
}
/** @psalm-suppress UndefinedMethod */
$cacheId = $cache->getNumericStorageId() . '/' . $groupFolderStorage->getFolderId();