Ensure content is being read before written
This commit is contained in:
parent
d85cea9cb2
commit
3644e43d76
1 changed files with 5 additions and 5 deletions
|
@ -246,17 +246,17 @@ class Context {
|
||||||
|
|
||||||
$accountSectionEntered = $false;
|
$accountSectionEntered = $false;
|
||||||
|
|
||||||
Get-Content $($this.GetNextcloudConfigFile()) | `
|
(Get-Content $($this.GetNextcloudConfigFile())) | `
|
||||||
ForEach-Object {
|
ForEach-Object {
|
||||||
if ($_ -eq "[Accounts]") {
|
if ($_ -eq "[Accounts]") {
|
||||||
$accountSectionEntered = $true;
|
$accountSectionEntered = $true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_ -eq "" -and $accountSectionEntered) {
|
if ($_ -eq "" -and $accountSectionEntered) {
|
||||||
[string]::Join(
|
[string]::Join(
|
||||||
"`n",
|
"`n",
|
||||||
@(
|
@(
|
||||||
"0\$configName\$folderID\localPath=$localPath",
|
"0\$configName\$folderID\localPath=$localPath",
|
||||||
"0\$configName\$folderID\targetPath=$targetPath"));
|
"0\$configName\$folderID\targetPath=$targetPath"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue