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
2 changes: 1 addition & 1 deletion source/ResizingClient/ResizingUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
{
stream.Seek(0, SeekOrigin.Begin);
var bytes = new byte[stream.Length];
stream.Read(bytes, 0, (int)stream.Length);

Check warning on line 78 in source/ResizingClient/ResizingUtil.cs

View workflow job for this annotation

GitHub Actions / build (10.0.x, net10.0)

Avoid inexact read with 'System.IO.Stream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022)

Check warning on line 78 in source/ResizingClient/ResizingUtil.cs

View workflow job for this annotation

GitHub Actions / build (10.0.x, net10.0)

Avoid inexact read with 'System.IO.Stream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022)
return Upload(bytes, filename, category);
}

Expand Down Expand Up @@ -105,7 +105,7 @@
var fragmentIndex = url.IndexOf('#');
var fragment = fragmentIndex >= 0 ? url.Substring(fragmentIndex) : string.Empty;
var urlWithoutFragment = fragmentIndex >= 0 ? url.Substring(0, fragmentIndex) : url;
var separator = urlWithoutFragment.IndexOf('?', StringComparison.Ordinal) >= 0 ? "&" : "?";
var separator = urlWithoutFragment.IndexOf('?') >= 0 ? "&" : "?";
return $"{urlWithoutFragment}{separator}{query}{fragment}";
}

Expand Down
Loading