]> source.dussan.org Git - nextcloud-server.git/commit
Add flock to config
authorLukas Reschke <lukas@owncloud.com>
Thu, 25 Sep 2014 16:43:04 +0000 (18:43 +0200)
committerLukas Reschke <lukas@owncloud.com>
Tue, 30 Sep 2014 13:53:27 +0000 (15:53 +0200)
commit68cf6681e5efc79610eec2199e8850ba88cc1808
treee5684a139fe6f5a404c00b1d5f9bdc813102774a
parent5292a14cdfa9efe6d9220b341f3261fe72c39b17
Add flock to config

This adds a file lock to the config in hope that this prevents race conditions as reported in https://github.com/owncloud/core/issues/11070

Testplan:

- [ ] Delete config.php and make it read-only => Error is thrown that it is not writeable
- [ ] Installation still works
- [ ] Changing config settings works (i.e. using the SMTP config switches in the administration menu)
- [ ] Your PC didn't blow up
- [ ] Installing the news app and the "Disable AppCode checker" app did not destroy your installation

Only skip the main config

Otherwise read only additional configs might not be processed

Test on tmpdir
lib/private/config.php
lib/private/legacy/config.php
tests/lib/config.php