diff options
author | Julius Härtl <jus@bitgrid.net> | 2024-08-28 17:13:41 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2024-08-29 12:43:44 +0200 |
commit | 61108882b9405bbd3f69213e430201e37e32631b (patch) | |
tree | 3b11c30b63198e321c54c929455cbd71a6625303 /lib | |
parent | 466f19b689cbb356b56ef8b54d262220bb70affe (diff) | |
download | nextcloud-server-61108882b9405bbd3f69213e430201e37e32631b.tar.gz nextcloud-server-61108882b9405bbd3f69213e430201e37e32631b.zip |
fix: Do not fail to get internal path on NonExistingFile/NonExistingFolder
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Node/NonExistingFile.php | 8 | ||||
-rw-r--r-- | lib/private/Files/Node/NonExistingFolder.php | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/private/Files/Node/NonExistingFile.php b/lib/private/Files/Node/NonExistingFile.php index d154876432e..66ec2e6c040 100644 --- a/lib/private/Files/Node/NonExistingFile.php +++ b/lib/private/Files/Node/NonExistingFile.php @@ -38,6 +38,14 @@ class NonExistingFile extends File { } } + public function getInternalPath() { + if ($this->fileInfo) { + return parent::getInternalPath(); + } else { + return $this->getParent()->getMountPoint()->getInternalPath($this->getPath()); + } + } + public function stat() { throw new NotFoundException(); } diff --git a/lib/private/Files/Node/NonExistingFolder.php b/lib/private/Files/Node/NonExistingFolder.php index 5650c99fe73..4489fdaf010 100644 --- a/lib/private/Files/Node/NonExistingFolder.php +++ b/lib/private/Files/Node/NonExistingFolder.php @@ -38,6 +38,14 @@ class NonExistingFolder extends Folder { } } + public function getInternalPath() { + if ($this->fileInfo) { + return parent::getInternalPath(); + } else { + return $this->getParent()->getMountPoint()->getInternalPath($this->getPath()); + } + } + public function stat() { throw new NotFoundException(); } |