summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/AppData
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/AppData')
-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;