Skip to content

Commit 5369493

Browse files
thomhurstclaude
andauthored
fix: Remove redundant directory creation and use HttpClient from DownloadOptions (#1669)
- FileSystemModuleEstimatedTimeProvider: Remove duplicate directoryInfo.Create() call that was redundant since directory is already created in the if block above - Downloader: Pass HttpClient from DownloadOptions to HttpOptions so that custom HttpClient instances are actually used during downloads Fixes #1588, #1589 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent dfd5b77 commit 5369493

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/ModularPipelines/Context/Downloader.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public async Task<HttpResponseMessage> DownloadResponseAsync(DownloadOptions opt
6060
var response = await _http.SendAsync(new HttpOptions(request)
6161
{
6262
LoggingType = options.LoggingType,
63+
HttpClient = options.HttpClient,
6364
}, cancellationToken).ConfigureAwait(false);
6465

6566
return response.EnsureSuccessStatusCode();

src/ModularPipelines/Engine/FileSystemModuleEstimatedTimeProvider.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ public async Task<IEnumerable<SubModuleEstimation>> GetSubModuleEstimatedTimesAs
3030
directoryInfo.Create();
3131
}
3232

33-
directoryInfo.Create();
34-
3533
var paths = directoryInfo
3634
.EnumerateFiles("*.txt", SearchOption.TopDirectoryOnly)
3735
.Where(x => x.Name.StartsWith($"Mod-{moduleType.FullName}"))

0 commit comments

Comments
 (0)