diff --git a/lib/private/Encryption/Util.php b/lib/private/Encryption/Util.php index 59c0f9a11d47..a869fdd558a8 100644 --- a/lib/private/Encryption/Util.php +++ b/lib/private/Encryption/Util.php @@ -235,7 +235,11 @@ public function getUidAndFilename($path) { // strip the first 2 directories (expected to be "//files/path/to/files") // so mountPoint is expected to be "/files/path/to..." $mountPoint = \implode('/', \array_slice($parts, 2)); - $originalPath = "/{$mountPoint}/{$internalPath}"; + if ($mountPoint !== '') { + $originalPath = "/{$mountPoint}/{$internalPath}"; + } else { + $originalPath = "/{$internalPath}"; + } if ($storage->instanceOfStorage('\OCA\Files_Sharing\ISharedStorage')) { // TODO: Improve sharedStorage detection.