summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-12-21 11:08:19 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-12-21 11:08:19 +0100
commitd0956c9a4213d93674355e6fb7d7b0e9e0adfbdf (patch)
tree4aa4d877e7954d75d466ccdf58787f890a5d2adc /lib/private
parenta8f611093a5933388fdd49ccacd8e70c3e96bd78 (diff)
downloadnextcloud-server-d0956c9a4213d93674355e6fb7d7b0e9e0adfbdf.tar.gz
nextcloud-server-d0956c9a4213d93674355e6fb7d7b0e9e0adfbdf.zip
Followup 12833, gracefully handle the getting of /
Else this breaks the app page Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/AppData/AppData.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/Files/AppData/AppData.php b/lib/private/Files/AppData/AppData.php
index 3d098ad98ca..7ce29bd0e00 100644
--- a/lib/private/Files/AppData/AppData.php
+++ b/lib/private/Files/AppData/AppData.php
@@ -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;