Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
03d5ea6c
Commit
03d5ea6c
authored
11 years ago
by
Björn Schießle
Browse files
Options
Downloads
Patches
Plain Diff
check not only if the keyfile folder exists but also if it contains keyfiles
parent
f47ff13a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/util.php
+12
-8
12 additions, 8 deletions
lib/util.php
with
12 additions
and
8 deletions
lib/util.php
+
12
−
8
View file @
03d5ea6c
...
...
@@ -410,14 +410,18 @@ class OC_Util {
$encryptedFiles
=
false
;
if
(
OC_App
::
isEnabled
(
'files_encryption'
)
===
false
)
{
$view
=
new
OC\Files\View
(
'/'
.
OCP\User
::
getUser
());
if
(
$view
->
file_exists
(
'/files_encryption/keyfiles'
))
{
$encryptedFiles
=
true
;
$keyfilePath
=
'/files_encryption/keyfiles'
;
if
(
$view
->
is_dir
(
$keyfilePath
))
{
$dircontent
=
$view
->
getDirectoryContent
(
$keyfilePath
);
if
(
!
empty
(
$dircontent
))
{
$encryptedFiles
=
true
;
}
}
}
return
$encryptedFiles
;
}
/**
* @brief Check for correct file permissions of data directory
* @paran string $dataDirectory
...
...
@@ -654,16 +658,16 @@ class OC_Util {
}
return
$value
;
}
/**
* @brief Public function to encode url parameters
*
* This function is used to encode path to file before output.
* Encoding is done according to RFC 3986 with one exception:
* Character '/' is preserved as is.
* Character '/' is preserved as is.
*
* @param string $component part of URI to encode
* @return string
* @return string
*/
public
static
function
encodePath
(
$component
)
{
$encoded
=
rawurlencode
(
$component
);
...
...
@@ -810,7 +814,7 @@ class OC_Util {
}
}
}
/**
* @brief Check if the connection to the internet is disabled on purpose
* @return bool
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment