Skip to content

Commit cec79d7

Browse files
committed
Fix: Create directories
1 parent 929fb25 commit cec79d7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/CodeOfChaos.CliArgsParser.Library/CommandAtlases/DownloadIcon/DownloadIconCommand.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ private static async Task<SuccessOrFailure> TryGetIcon(DownloadIconParameters pa
107107

108108
// Placeholder for the final icon's path
109109
string destinationPath = Path.Combine(parameters.Root, parameters.IconFolder, "icon.png");
110+
111+
// create all folders if needed for the destination path
112+
Directory.CreateDirectory(Path.GetDirectoryName(destinationPath)!);
110113

111114
if (isUrl) {
112115
// Download the file from URL using HttpClient

0 commit comments

Comments
 (0)