Ensure content is being read before written

This commit is contained in:
Manuel Thalmann 2023-07-03 00:58:21 +02:00
parent 95e8ce6992
commit 72a943a784

View file

@ -246,17 +246,17 @@ class Context {
$accountSectionEntered = $false;
Get-Content $($this.GetNextcloudConfigFile()) | `
(Get-Content $($this.GetNextcloudConfigFile())) | `
ForEach-Object {
if ($_ -eq "[Accounts]") {
$accountSectionEntered = $true;
}
if ($_ -eq "" -and $accountSectionEntered) {
[string]::Join(
"`n",
@(
"0\$configName\$folderID\localPath=$localPath",
[string]::Join(
"`n",
@(
"0\$configName\$folderID\localPath=$localPath",
"0\$configName\$folderID\targetPath=$targetPath"));
}