From 77a9287238284edf48bd39fa6895a2296a7fe02a Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 3 Jul 2023 00:59:11 +0200 Subject: [PATCH] Change order of operations when editing sync --- scripts/Windows/Scripts/Context.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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())) | `