From 9ca63ed491e69dc7f1a3ba830cd43ae5ad64199b Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=B5=9C=EC=A2=85=ED=97=8C/Common=20Platform=20Lab=28SR=29?= =?utf8?q?/Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Thu, 7 May 2020 13:40:28 +0900 Subject: [PATCH] Apply rules to .preload file name (#227) Change-Id: I2adb4deab7d10a680c8d08fa7d631ffe1d267380 --- Managed/Tizen.Runtime/Tizen.Runtime.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Managed/Tizen.Runtime/Tizen.Runtime.cs b/Managed/Tizen.Runtime/Tizen.Runtime.cs index 6a87da2..580c44f 100644 --- a/Managed/Tizen.Runtime/Tizen.Runtime.cs +++ b/Managed/Tizen.Runtime/Tizen.Runtime.cs @@ -25,11 +25,16 @@ namespace Tizen.Runtime const string preloadPath = "/usr/share/dotnet.tizen/preload/"; public static void Preload() { - string[] paths = Directory.GetFiles(preloadPath); + string[] paths = Directory.GetFiles(preloadPath, "*.preload"); Array.Sort(paths); foreach (string path in paths) { - if (Path.GetExtension(path) != ".preload") + // ex) Tizen.preload / 0A.Tizen.preload / A0.Tizen.preload / .0.Tizen.preload / .00.Tizen.preload + if (!char.IsNumber(Path.GetFileName(path), 0) || !char.IsNumber(Path.GetFileName(path), 1)) + continue; + + // ex) 000.Tizen.preload / 0.Tizen.preload + if (Path.GetFileName(path).IndexOf('.') != 2) continue; try -- 2.34.1