From 8c0fe7c742b966ec7e752e4f9aebedba94785321 Mon Sep 17 00:00:00 2001 From: Binary Alley Date: Sun, 3 Nov 2024 19:56:56 +0200 Subject: [PATCH] Reverts erroneous curly brackets removal --- .../Services/DirectoryProviderService.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/DirectoryProviderService.cs b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/DirectoryProviderService.cs index 70cd27a9..57ba55b1 100644 --- a/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/DirectoryProviderService.cs +++ b/src/Lumina.Domain/Core/BoundedContexts/FileSystemManagementBoundedContext/FileSystemManagementAggregate/Services/DirectoryProviderService.cs @@ -241,12 +241,14 @@ internal class DirectoryProviderService : IDirectoryProviderService string destFilePath = _fileSystem.Path.Combine(destDir, fileName); // if a file with the same name exists in the destination if (_fileSystem.File.Exists(destFilePath)) + { if (overwrite) { // overwrite the file in the destination directory _fileSystem.File.Delete(destFilePath); _fileSystem.File.Move(sourceFilePath, destFilePath); } + } else _fileSystem.File.Move(sourceFilePath, destFilePath); // move the file if it does not exist in the destination directory }