From 80e37305ebfcd6f32659ec007ab385a433b8c94b Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 15 Nov 2023 14:28:08 +0100 Subject: [PATCH] fix(operation): groupfolder path is user independent getPath returns the relativ to the user, i.e. $userid/files/$groupFolderInternalPath which is then used to contstruct the absolute path and keeping this information. By using getInernalPath() we only receive the groupfolder relativ path and can construct the correct and expected Nextcloud relative path as advertised. Signed-off-by: Arthur Schiwon --- lib/Operation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Operation.php b/lib/Operation.php index f4bad39..b7c8ed6 100644 --- a/lib/Operation.php +++ b/lib/Operation.php @@ -273,7 +273,7 @@ protected function replacePlaceholderN(Node $node): string { if (isset($storage) && $storage->instanceOfStorage(GroupFolderStorage::class)) { // group folders are always located within $DATADIR/__groupfolders/ - $absPath = $storage->getLocalFile($node->getPath()); + $absPath = $storage->getLocalFile($node->getInternalPath()); $pos = strpos($absPath, '/__groupfolders/'); // if the string cannot be found, the fallback is absolute path // it should never happen #famousLastWords