Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
9dd51707
Commit
9dd51707
authored
May 11, 2015
by
Bjoern Schiessle
Browse files
fix check if file is excluded from encryption
parent
ebf39539
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/private/encryption/util.php
View file @
9dd51707
...
...
@@ -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
))
{
...
...
tests/lib/encryption/utiltest.php
View file @
9dd51707
...
...
@@ -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
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment