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
6e3a8416
Commit
6e3a8416
authored
Nov 12, 2014
by
Thomas Müller
Browse files
Merge pull request #12139 from owncloud/DoNotTouchMe
Try to read the file only instead of trying to touch
parents
d5796bba
49ddaf94
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/private/config.php
View file @
6e3a8416
...
...
@@ -138,12 +138,12 @@ class Config {
// Include file and merge config
foreach
(
$configFiles
as
$file
)
{
if
(
$file
===
$this
->
configFilePath
&&
!@
touch
(
$file
))
{
// Writing to the main config might not be possible, e.g. if the wrong
$filePointer
=
@
fopen
(
$file
,
'r'
);
if
(
$file
===
$this
->
configFilePath
&&
$filePointer
===
false
)
{
// Opening the main config might not be possible, e.g. if the wrong
// permissions are set (likely on a new installation)
continue
;
}
$filePointer
=
fopen
(
$file
,
'r'
);
// Try to acquire a file lock
if
(
!
flock
(
$filePointer
,
LOCK_SH
))
{
...
...
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