mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-11 19:44:52 +00:00
fix: check for null when getting directory
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user