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 {
|
try {
|
||||||
$path = $this->getAppDataFolderName() . '/' . $this->appId . '/' . $name;
|
// Hardening if somebody wants to retrieve '/'
|
||||||
$node = $this->rootFolder->get($path);
|
if ($name === '/') {
|
||||||
|
$node = $this->getAppDataFolder();
|
||||||
|
} else {
|
||||||
|
$path = $this->getAppDataFolderName() . '/' . $this->appId . '/' . $name;
|
||||||
|
$node = $this->rootFolder->get($path);
|
||||||
|
}
|
||||||
} catch (NotFoundException $e) {
|
} catch (NotFoundException $e) {
|
||||||
$this->folders->set($key, $e);
|
$this->folders->set($key, $e);
|
||||||
throw $e;
|
throw $e;
|
||||||
|
|
Loading…
Reference in New Issue