From 3374a19acb6034ee63a13c0ce1cd473654ecbd7c Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Tue, 17 Mar 2020 07:28:52 -0700 Subject: [PATCH] Change directory move to copy. --- Agent.Installer.Win/Agent.Installer.Win.csproj | 1 + Agent.Installer.Win/Services/InstallerService.cs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Agent.Installer.Win/Agent.Installer.Win.csproj b/Agent.Installer.Win/Agent.Installer.Win.csproj index 5a601b14..5bb5f90b 100644 --- a/Agent.Installer.Win/Agent.Installer.Win.csproj +++ b/Agent.Installer.Win/Agent.Installer.Win.csproj @@ -90,6 +90,7 @@ true + diff --git a/Agent.Installer.Win/Services/InstallerService.cs b/Agent.Installer.Win/Services/InstallerService.cs index 6030853f..901e5859 100644 --- a/Agent.Installer.Win/Services/InstallerService.cs +++ b/Agent.Installer.Win/Services/InstallerService.cs @@ -1,4 +1,5 @@ -using Microsoft.Win32; +using Microsoft.VisualBasic.FileIO; +using Microsoft.Win32; using Remotely.Shared.Models; using System; using System.Collections.Generic; @@ -251,7 +252,7 @@ namespace Remotely.Agent.Installer.Win.Services } else if (Directory.Exists(entry)) { - Directory.Move(entry, Path.Combine(InstallPath, new DirectoryInfo(entry).Name)); + FileSystem.CopyDirectory(entry, Path.Combine(InstallPath, new DirectoryInfo(entry).Name), true); } await Task.Delay(1); }