Merge pull request #47625 from nextcloud/backport/47581/stable30

[stable30] fix: Do not fail to get internal path on NonExistingFile
This commit is contained in:
Andy Scherzinger 2024-09-03 01:29:35 +02:00 committed by GitHub
commit 073b792dbf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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();
}