From d616a3eca12c664d0d894faf7ffb138df09229a3 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 6 Jun 2023 18:55:01 +0200 Subject: [PATCH] fix: do not use removed View::getLocalFolder() Signed-off-by: Arthur Schiwon --- lib/Operation.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/Operation.php b/lib/Operation.php index f4bad39..a5c70b7 100644 --- a/lib/Operation.php +++ b/lib/Operation.php @@ -25,6 +25,7 @@ use Exception; use InvalidArgumentException; +use OC\Files\Storage\Local; use OC\Files\View; use OC\User\NoUserException; use OCA\Files_Sharing\SharedStorage; @@ -195,9 +196,14 @@ protected function buildCommand(string $template, Node $node, string $event, arr if (strpos($command, '%f')) { try { + $fullPath = null; $view = new View(); if ($node instanceof Folder) { - $fullPath = $view->getLocalFolder($node->getPath()); + $storage = $node->getStorage(); + if ($storage->instanceOfStorage(Local::class)) { + /** @var Local $storage */ + $fullPath = $storage->getSourcePath($node->getPath()); + } } else { $fullPath = $view->getLocalFile($node->getPath()); }