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()); }