Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ internal static string GetOutFilePath(HttpResponseMessage response, string quali
// Get file name from last segment of Uri
string? lastUriSegment = System.Net.WebUtility.UrlDecode(response.RequestMessage?.RequestUri?.Segments[^1]);

return Directory.Exists(qualifiedOutFile) ? Path.Join(qualifiedOutFile, lastUriSegment) : qualifiedOutFile;
return Directory.Exists(qualifiedOutFile)
? Path.Join(qualifiedOutFile, Path.GetFileName(lastUriSegment))
Comment thread
SeeminglyScience marked this conversation as resolved.
: qualifiedOutFile;
Comment thread
SeeminglyScience marked this conversation as resolved.
}

internal static string GetProtocol(HttpResponseMessage response) => string.Create(CultureInfo.InvariantCulture, $"HTTP/{response.Version}");
Expand Down
Loading