Browse Source
Merge pull request #42298 from nextcloud/readOnlyFSFalse
Don't write back .htaccess file on a RO filesystem
pull/42389/head
Git'Fellow
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
0 deletions
-
lib/private/Setup.php
|
|
|
@ -522,6 +522,10 @@ class Setup { |
|
|
|
\OCP\Server::get(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]; |
|
|
|
|