Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lib/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}
Expand Down