Add comment about split usage in osu:// protocol link handling

This commit is contained in:
Bartłomiej Dach 2022-02-22 22:24:37 +01:00
parent 6de4e05e49
commit d1d6847d32
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -921,6 +921,9 @@ namespace osu.Game
if (!url.StartsWith(OSU_PROTOCOL, StringComparison.Ordinal))
throw new ArgumentException("Invalid osu URL provided.", nameof(url));
// note that `StringSplitOptions.RemoveEmptyEntries` is not explicitly specified here
// in order to ensure that the protocol URL is valid (i.e. it has two slashes in the `osu://` part,
// causing the link content to be stored to the 2nd index rather than the 1st).
string[] pieces = url.Split('/');
switch (pieces[2])