MatchPath

This commit is contained in:
2023-09-27 08:52:48 -07:00
parent c1a4eb4808
commit 0d6af37f89
3 changed files with 5 additions and 1 deletions

View File

@ -37,7 +37,7 @@ public partial class Worker : BackgroundService
string[] directories = Directory.GetDirectories(_AppSettings.WatchDirectory, "*", SearchOption.TopDirectoryOnly);
foreach (string directory in directories)
{
checkDirectory = Path.Combine(_AppSettings.Destination, Path.GetFileName(directory));
checkDirectory = !_AppSettings.MatchPath ? _AppSettings.Destination : Path.Combine(_AppSettings.Destination, Path.GetFileName(directory));
try
{
if (!Directory.Exists(checkDirectory))