Skip to content

Commit 21e263a

Browse files
committed
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 <blizzz@arthur-schiwon.de>
1 parent 54019e0 commit 21e263a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Operation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ protected function replacePlaceholderN(Node $node): string {
271271

272272
if (isset($storage) && $storage->instanceOfStorage(GroupFolderStorage::class)) {
273273
// group folders are always located within $DATADIR/__groupfolders/
274-
$absPath = $storage->getLocalFile($node->getPath());
274+
$absPath = $storage->getLocalFile($node->getInternalPath());
275275
$pos = strpos($absPath, '/__groupfolders/');
276276
// if the string cannot be found, the fallback is absolute path
277277
// it should never happen #famousLastWords

0 commit comments

Comments
 (0)