diff --git a/lib/Operation.php b/lib/Operation.php index e1402c2..aa4dafa 100644 --- a/lib/Operation.php +++ b/lib/Operation.php @@ -91,9 +91,9 @@ protected function buildCommand(string $template, Node $node, string $event, arr $command = str_replace('%n', escapeshellarg(str_replace($base_path . '/', '', $path)), $command); } - if (false && strpos($command, '%f')) { + if (strpos($command, '%f')) { try { - $view = new View($node->getParent()->getPath()); + $view = new View(); if ($node instanceof Folder) { $fullPath = $view->getLocalFolder($node->getPath()); } else { @@ -102,7 +102,6 @@ protected function buildCommand(string $template, Node $node, string $event, arr if ($fullPath === null) { throw new \InvalidArgumentException(); } - //$fullPath = $node->getParent()->getFullPath($node->getPath()); $command = str_replace('%f', escapeshellarg($fullPath), $command); } catch (\Exception $e) { throw new \InvalidArgumentException('Could not determine full path');