[Pkg-owncloud-commits] [owncloud] 45/123: fix check if file is excluded from encryption
David Prévot
taffit at moszumanska.debian.org
Tue May 19 23:55:12 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit 9dd517071e60ff3677ea79e84577f3556ac7d4cc
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date: Mon May 11 12:38:59 2015 +0200
fix check if file is excluded from encryption
---
lib/private/encryption/util.php | 2 +-
tests/lib/encryption/utiltest.php | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/private/encryption/util.php b/lib/private/encryption/util.php
index 032ac83..45d4dd9 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 7de5704..0154fa3 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),
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list