summaryrefslogtreecommitdiffstats
path: root/lib/private/encryption/keys/storage.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/encryption/keys/storage.php')
-rw-r--r--lib/private/encryption/keys/storage.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/encryption/keys/storage.php b/lib/private/encryption/keys/storage.php
index 7d0612ae30e..42610bd0b41 100644
--- a/lib/private/encryption/keys/storage.php
+++ b/lib/private/encryption/keys/storage.php
@@ -339,7 +339,7 @@ class Storage implements \OCP\Encryption\Keys\IStorage {
protected function keySetPreparation($path) {
// If the file resides within a subdirectory, create it
if (!$this->view->file_exists($path)) {
- $sub_dirs = explode('/', $path);
+ $sub_dirs = explode('/', ltrim($path, '/'));
$dir = '';
foreach ($sub_dirs as $sub_dir) {
$dir .= '/' . $sub_dir;