mirror of
https://github.com/LBPUnion/UnionPatcher.git
synced 2025-04-25 14:05:18 +00:00
Update UnionPatcher/Patcher.cs
Co-authored-by: Josh <josh@slendy.pw>
This commit is contained in:
parent
9a19005765
commit
4db23adae4
1 changed files with 2 additions and 4 deletions
|
@ -21,10 +21,8 @@ public static class Patcher {
|
||||||
|
|
||||||
public static byte[] PatchData(byte[] data, string serverUrl) {
|
public static byte[] PatchData(byte[] data, string serverUrl) {
|
||||||
#region Validation
|
#region Validation
|
||||||
// If server URL contains a trailing slash, loop until it's gone.
|
if(serverUrl.EndsWith('/')) {
|
||||||
while (serverUrl.EndsWith('/'))
|
throw new ArgumentException("URL must not contain a trailing slash!");
|
||||||
{
|
|
||||||
serverUrl = serverUrl.Remove(serverUrl.Length - 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Attempt to create URI to see if it's valid
|
// Attempt to create URI to see if it's valid
|
||||||
|
|
Loading…
Add table
Reference in a new issue