Commit 9dd51707 authored by Bjoern Schiessle's avatar Bjoern Schiessle
Browse files

fix check if file is excluded from encryption

parent ebf39539
......@@ -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)) {
......
......@@ -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),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment