From 5eea99de4f8dce0bd6e4be5e06787da8f302f816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 28 Aug 2024 17:13:41 +0200 Subject: [PATCH] fix: Do not fail to get internal path on NonExistingFile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Files/Node/NonExistingFile.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/private/Files/Node/NonExistingFile.php b/lib/private/Files/Node/NonExistingFile.php index d154876432e9e..66ec2e6c0403c 100644 --- a/lib/private/Files/Node/NonExistingFile.php +++ b/lib/private/Files/Node/NonExistingFile.php @@ -38,6 +38,14 @@ public function getId() { } } + public function getInternalPath() { + if ($this->fileInfo) { + return parent::getInternalPath(); + } else { + return $this->getParent()->getMountPoint()->getInternalPath($this->getPath()); + } + } + public function stat() { throw new NotFoundException(); }