Merge pull request #16233 from owncloud/enc_fix_check_if_file_is_excluded
fix check if a file is excluded from encryption
This commit is contained in:
commit
b11c0c533e
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue