mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 09:13:19 -04:00
Merge pull request #42385 from nextcloud/backport/42298/stable27
[stable27] Don't write back .htaccess file on a RO filesystem
This commit is contained in:
commit
3f54f174cc
1 changed files with 4 additions and 0 deletions
|
|
@ -522,6 +522,10 @@ class Setup {
|
|||
\OC::$server->query(Installer::class)
|
||||
);
|
||||
|
||||
if (!is_writable($setupHelper->pathToHtaccess())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$htaccessContent = file_get_contents($setupHelper->pathToHtaccess());
|
||||
$content = "#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####\n";
|
||||
$htaccessContent = explode($content, $htaccessContent, 2)[0];
|
||||
|
|
|
|||
Loading…
Reference in a new issue