Skip to content

Commit af9e0af

Browse files
authored
Merge pull request #75 from nextcloud/backport/71/stable18
[stable18] Bugfix: remove if false and fix full path
2 parents 084a9d9 + 512ff70 commit af9e0af

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lib/Operation.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ protected function buildCommand(string $template, Node $node, string $event, arr
9191
$command = str_replace('%n', escapeshellarg(str_replace($base_path . '/', '', $path)), $command);
9292
}
9393

94-
if (false && strpos($command, '%f')) {
94+
if (strpos($command, '%f')) {
9595
try {
96-
$view = new View($node->getParent()->getPath());
96+
$view = new View();
9797
if ($node instanceof Folder) {
9898
$fullPath = $view->getLocalFolder($node->getPath());
9999
} else {
@@ -102,7 +102,6 @@ protected function buildCommand(string $template, Node $node, string $event, arr
102102
if ($fullPath === null) {
103103
throw new \InvalidArgumentException();
104104
}
105-
//$fullPath = $node->getParent()->getFullPath($node->getPath());
106105
$command = str_replace('%f', escapeshellarg($fullPath), $command);
107106
} catch (\Exception $e) {
108107
throw new \InvalidArgumentException('Could not determine full path');

0 commit comments

Comments
 (0)