From 0d11a67b446a3ceb8e4286612120f3f27f7aa6f4 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 25 Jul 2023 12:42:04 +0200 Subject: [PATCH] Fix format of manipulated nextcloud config --- scripts/Windows/Scripts/Context.ps1 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/Windows/Scripts/Context.ps1 b/scripts/Windows/Scripts/Context.ps1 index 0efe17bd..a20bdca6 100644 --- a/scripts/Windows/Scripts/Context.ps1 +++ b/scripts/Windows/Scripts/Context.ps1 @@ -291,18 +291,19 @@ class Context { $accountSectionEntered = $true; } - if ( - ($line -eq "" -and $accountSectionEntered) -or - ( - (-not $accountSectionLeft) -and - ($line -ne "") -and - ($i -eq ($oldContent.Count - 1)) - )) { + if ($line -eq "" -and $accountSectionEntered) { $accountSectionLeft = $true; $newSettings; } $line; + + if ( + (-not $accountSectionLeft) -and + ($i -eq ($oldContent.Count - 1))) + { + $newSettings; + } }) | Set-Content ($this.GetNextcloudConfigFile()); Write-Information "New nextcloud config:";