Skip to content

Commit

Permalink
Merge pull request #74 from nextcloud/backport/71/stable19
Browse files Browse the repository at this point in the history
[stable19] Bugfix: remove if false and fix full path
  • Loading branch information
blizzz authored Jan 14, 2021
2 parents 10d4814 + e6582a4 commit 771c498
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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');
Expand Down

0 comments on commit 771c498

Please sign in to comment.