aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Node
diff options
context:
space:
mode:
authorLouis <louis@chmn.me>2024-12-12 14:28:09 +0100
committerGitHub <noreply@github.com>2024-12-12 14:28:09 +0100
commitcabedbf9c384ddf1f75bd32d3efa0f1d4aa2a3b8 (patch)
tree428d88d01d4cc7739475ad30d481786940153e4e /lib/private/Files/Node
parentd8c34258781cea65ad71f2439e2d84038288fc95 (diff)
downloadnextcloud-server-cabedbf9c384ddf1f75bd32d3efa0f1d4aa2a3b8.tar.gz
nextcloud-server-cabedbf9c384ddf1f75bd32d3efa0f1d4aa2a3b8.zip
Revert "[stable30] fix: Handle copy of folders containing live photos"revert-49650-backport/49293/stable30
Diffstat (limited to 'lib/private/Files/Node')
-rw-r--r--lib/private/Files/Node/HookConnector.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Files/Node/HookConnector.php b/lib/private/Files/Node/HookConnector.php
index 48ca61d4033..8fd2ffa3369 100644
--- a/lib/private/Files/Node/HookConnector.php
+++ b/lib/private/Files/Node/HookConnector.php
@@ -171,7 +171,7 @@ class HookConnector {
public function copy($arguments) {
$source = $this->getNodeForPath($arguments['oldpath']);
- $target = $this->getNodeForPath($arguments['newpath'], $source instanceof Folder);
+ $target = $this->getNodeForPath($arguments['newpath']);
$this->root->emit('\OC\Files', 'preCopy', [$source, $target]);
$this->dispatcher->dispatch('\OCP\Files::preCopy', new GenericEvent([$source, $target]));
@@ -203,7 +203,7 @@ class HookConnector {
$this->dispatcher->dispatchTyped($event);
}
- private function getNodeForPath(string $path, bool $isDir = false): Node {
+ private function getNodeForPath(string $path): Node {
$info = Filesystem::getView()->getFileInfo($path);
if (!$info) {
$fullPath = Filesystem::getView()->getAbsolutePath($path);
@@ -212,7 +212,7 @@ class HookConnector {
} else {
$info = null;
}
- if ($isDir || Filesystem::is_dir($path)) {
+ if (Filesystem::is_dir($path)) {
return new NonExistingFolder($this->root, $this->view, $fullPath, $info);
} else {
return new NonExistingFile($this->root, $this->view, $fullPath, $info);