fix: check for null when getting directory

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
erikdred
2025-08-22 09:12:20 -04:00
committed by GitHub
parent d013068a0c
commit 06dc0e947e

View File

@@ -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);