mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:17:26 +08:00
Add comment about split usage in osu:// protocol link handling
This commit is contained in:
parent
6de4e05e49
commit
d1d6847d32
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user