mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
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:
commit
073b792dbf
2 changed files with 16 additions and 0 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue