From 9a6ce2ce4494518d0059dc6431b137fe08c607c7 Mon Sep 17 00:00:00 2001 From: Daniel Destouche Date: Tue, 19 Dec 2023 00:01:34 -0500 Subject: [PATCH] feat: Create directory hierarchy if not exists --- src/WinSW.Core/Util/FileHelper.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/WinSW.Core/Util/FileHelper.cs b/src/WinSW.Core/Util/FileHelper.cs index 6b925da..b744359 100644 --- a/src/WinSW.Core/Util/FileHelper.cs +++ b/src/WinSW.Core/Util/FileHelper.cs @@ -12,6 +12,7 @@ namespace WinSW.Util { public static void MoveOrReplaceFile(string sourceFileName, string destFileName) { + new FileInfo(destFileName).Directory?.Create(); #if NET File.Move(sourceFileName, destFileName, true); #else