Fix format of manipulated nextcloud config

This commit is contained in:
Manuel Thalmann 2023-07-25 12:42:04 +02:00
parent 0609221a8e
commit 0d11a67b44

View file

@ -291,18 +291,19 @@ class Context {
$accountSectionEntered = $true; $accountSectionEntered = $true;
} }
if ( if ($line -eq "" -and $accountSectionEntered) {
($line -eq "" -and $accountSectionEntered) -or
(
(-not $accountSectionLeft) -and
($line -ne "") -and
($i -eq ($oldContent.Count - 1))
)) {
$accountSectionLeft = $true; $accountSectionLeft = $true;
$newSettings; $newSettings;
} }
$line; $line;
if (
(-not $accountSectionLeft) -and
($i -eq ($oldContent.Count - 1)))
{
$newSettings;
}
}) | Set-Content ($this.GetNextcloudConfigFile()); }) | Set-Content ($this.GetNextcloudConfigFile());
Write-Information "New nextcloud config:"; Write-Information "New nextcloud config:";