diff --git a/src/PepperDash.Essentials/ControlSystem.cs b/src/PepperDash.Essentials/ControlSystem.cs index 554c7bc9..c04080f3 100644 --- a/src/PepperDash.Essentials/ControlSystem.cs +++ b/src/PepperDash.Essentials/ControlSystem.cs @@ -635,7 +635,9 @@ namespace PepperDash.Essentials File.Delete(destinationPath); // Ensure the parent directory exists - Directory.CreateDirectory(Path.GetDirectoryName(destinationPath)); + var parentDir = Path.GetDirectoryName(destinationPath); + if (!string.IsNullOrEmpty(parentDir)) + Directory.CreateDirectory(parentDir); entry.ExtractToFile(destinationPath, true);