Skip to content

Commit 0374ca6

Browse files
support .ser files
1 parent 17a891a commit 0374ca6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Code/FileSystem/FileSystem.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ public static class FileSystem
1717

1818
public static void UpdateScriptPathCollection()
1919
{
20-
RegisteredScriptPaths = Directory
21-
.GetFiles(MainDirPath, "*.txt", SearchOption.AllDirectories)
20+
List<string> paths = [];
21+
paths.AddRange(Directory.GetFiles(MainDirPath, "*.txt", SearchOption.AllDirectories));
22+
paths.AddRange(Directory.GetFiles(MainDirPath, "*.ser", SearchOption.AllDirectories));
23+
24+
RegisteredScriptPaths = paths
2225
// ignore files with a pound sign at the start
2326
.Where(path => Path.GetFileName(path).FirstOrDefault() != '#')
2427
.ToArray();
@@ -66,7 +69,6 @@ public static void Initialize()
6669

6770
ScriptFlagHandler.RegisterScript(lines, scriptName);
6871
}
69-
7072
}
7173

7274
public static string GetScriptPath(ScriptName scriptName)

0 commit comments

Comments
 (0)