fix: Do not fail to get internal path on NonExistingFile/NonExistingFolder

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2024-08-28 17:13:41 +02:00 committed by Andy Scherzinger
parent bf5d09c0a9
commit 2e312e47f4
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
2 changed files with 16 additions and 0 deletions

View file

@ -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();
}

View file

@ -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();
}