From 21e263a6760dd51df8f55e5faad4b986b50b09e1 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 3dbfc7d..7d4cd49 100644 --- a/lib/Operation.php +++ b/lib/Operation.php @@ -271,7 +271,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