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