Browse Source

fix check if file is excluded from encryption

remotes/origin/poc-doctrine-migrations
Bjoern Schiessle 11 years ago
parent
commit
9dd517071e
  1. 2
      lib/private/encryption/util.php
  2. 1
      tests/lib/encryption/utiltest.php

2
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)) {

1
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),

Loading…
Cancel
Save