diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-05-11 12:38:59 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2015-05-11 12:38:59 +0200 |
commit | 9dd517071e60ff3677ea79e84577f3556ac7d4cc (patch) | |
tree | 00df68664c1d1012e0328db4fd82fc32f76e0016 | |
parent | ebf3953908a8dfdb754a5031d69326c6b83cf609 (diff) | |
download | nextcloud-server-9dd517071e60ff3677ea79e84577f3556ac7d4cc.tar.gz nextcloud-server-9dd517071e60ff3677ea79e84577f3556ac7d4cc.zip |
fix check if file is excluded from encryption
-rw-r--r-- | lib/private/encryption/util.php | 2 | ||||
-rw-r--r-- | tests/lib/encryption/utiltest.php | 1 |
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), |