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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -635,7 +635,9 @@ namespace PepperDash.Essentials
File.Delete(destinationPath); File.Delete(destinationPath);
// Ensure the parent directory exists // 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); entry.ExtractToFile(destinationPath, true);