Update UnionPatcher.Gui/Forms/FilePatchForm.cs

Co-authored-by: Josh <josh@slendy.pw>
This commit is contained in:
McMistrzYT 2023-02-09 18:58:58 +01:00 committed by GitHub
parent 45f556a2fa
commit 9acde41b82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,14 +132,7 @@ public class FilePatchForm : Form {
Gui.CreateOkDialog("Error occurred while patching", "An error occured while patching:\n" + e);
return;
}
// Purely for the dialog box to show the correct URL. Actual patcher has this too.
// If server URL contains a trailing slash, loop until it's gone.
string formattedUrl = this.serverUrl.Text;
while (formattedUrl.EndsWith('/'))
{
formattedUrl = formattedUrl.Remove(formattedUrl.Length - 1);
}
this.serverUrl.Text = this.serverUrl.Text.TrimEnd('/');
Gui.CreateOkDialog("Success!", "The Server URL has been patched to " + formattedUrl);
}