mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 08:16:43 -04:00
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:
parent
bf5d09c0a9
commit
2e312e47f4
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