Followup 12833, gracefully handle the getting of /
Else this breaks the app page Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
a8f611093a
commit
d0956c9a42
|
@ -132,8 +132,13 @@ class AppData implements IAppData {
|
|||
}
|
||||
}
|
||||
try {
|
||||
$path = $this->getAppDataFolderName() . '/' . $this->appId . '/' . $name;
|
||||
$node = $this->rootFolder->get($path);
|
||||
// Hardening if somebody wants to retrieve '/'
|
||||
if ($name === '/') {
|
||||
$node = $this->getAppDataFolder();
|
||||
} else {
|
||||
$path = $this->getAppDataFolderName() . '/' . $this->appId . '/' . $name;
|
||||
$node = $this->rootFolder->get($path);
|
||||
}
|
||||
} catch (NotFoundException $e) {
|
||||
$this->folders->set($key, $e);
|
||||
throw $e;
|
||||
|
|
Loading…
Reference in New Issue