summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/encryption/util.php2
-rw-r--r--tests/lib/encryption/utiltest.php1
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/encryption/util.php b/lib/private/encryption/util.php
index 032ac83f37e..45d4dd90d9f 100644
--- a/lib/private/encryption/util.php
+++ b/lib/private/encryption/util.php
@@ -357,7 +357,7 @@ class Util {
public function isExcluded($path) {
$normalizedPath = \OC\Files\Filesystem::normalizePath($path);
$root = explode('/', $normalizedPath, 4);
- if (count($root) > 2) {
+ if (count($root) > 1) {
//detect system wide folders
if (in_array($root[1], $this->excludedPaths)) {
diff --git a/tests/lib/encryption/utiltest.php b/tests/lib/encryption/utiltest.php
index 7de57043920..0154fa30f7d 100644
--- a/tests/lib/encryption/utiltest.php
+++ b/tests/lib/encryption/utiltest.php
@@ -135,6 +135,7 @@ class UtilTest extends TestCase {
public function providePathsForTestIsExcluded() {
return array(
+ array('/files_encryption', true),
array('files_encryption/foo.txt', true),
array('test/foo.txt', false),
array('/user1/files_encryption/foo.txt', true),