From d2ec84449a204dc28b2bd5faf85123f5013c6ae3 Mon Sep 17 00:00:00 2001 From: Jerome Haltom Date: Mon, 27 Jan 2025 21:21:52 -0600 Subject: [PATCH] Collection init. --- src/IKVM.Runtime/Launcher.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/IKVM.Runtime/Launcher.cs b/src/IKVM.Runtime/Launcher.cs index a81662667..3846faf0c 100644 --- a/src/IKVM.Runtime/Launcher.cs +++ b/src/IKVM.Runtime/Launcher.cs @@ -96,13 +96,13 @@ static string[] Glob(string path) list.Add(dir != null ? Path.Combine(dir, fsi.Name) : fsi.Name); if (list.Count == 0) - return new string[] { path }; + return [path]; return list.ToArray(); } catch { - return new string[] { path }; + return [path]; } } @@ -117,7 +117,7 @@ static string[] Glob(string[] paths) for (var i = 0; i < paths.Length; i++) { var path = paths[i]; - if (path.IndexOf('*') != -1 || path.IndexOf('?') != -1) + if (path.Contains('*') || path.Contains('?')) list.AddRange(Glob(path)); else list.Add(path);