diff --git a/scripts/Windows/Scripts/Context.ps1 b/scripts/Windows/Scripts/Context.ps1 index 4afbce25..7f2677fc 100644 --- a/scripts/Windows/Scripts/Context.ps1 +++ b/scripts/Windows/Scripts/Context.ps1 @@ -225,9 +225,6 @@ class Context { [void] AddNextcloudSync([string] $localPath, [string] $targetPath, [bool] $virtualFiles) { $pattern = "^\d+\\Folders(?:WithPlaceholders)?\\(\d+)"; - $nextcloudProcess = Get-Process nextcloud; - $nextcloudPath = $nextcloudProcess.Path; - $nextcloudProcess | Stop-Process -Force; $folderID = ( Get-Content $($this.GetNextcloudConfigFile()) | ` @@ -244,6 +241,10 @@ class Context { $configName += "WithPlaceholders"; } + $nextcloudProcess = Get-Process nextcloud; + $nextcloudPath = $nextcloudProcess.Path; + $nextcloudProcess | Stop-Process -Force; + $accountSectionEntered = $false; (Get-Content $($this.GetNextcloudConfigFile())) | `