From: 최종헌/Common Platform Lab(SR)/Engineer/삼성전자 Date: Thu, 7 May 2020 04:40:28 +0000 (+0900) Subject: Apply rules to .preload file name (#227) X-Git-Tag: submit/tizen/20200528.002636~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9ca63ed491e69dc7f1a3ba830cd43ae5ad64199b;p=platform%2Fcore%2Fdotnet%2Flauncher.git Apply rules to .preload file name (#227) Change-Id: I2adb4deab7d10a680c8d08fa7d631ffe1d267380 --- 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