Skip to content

Commit b9a935e

Browse files
fix script name parsing bug
1 parent e431cd4 commit b9a935e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

FileSystem/FileSystem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ public static string GetScriptPath(ScriptName scriptName)
7575
return RegisteredScriptPaths.First(p => Path.GetFileNameWithoutExtension(p) == scriptName.Value);
7676
}
7777

78-
public static bool DoesScriptExist(string scriptName, out string path)
78+
public static bool DoesScriptExistByName(string scriptName, out string path)
7979
{
8080
UpdateScriptPathCollection();
8181

8282
path = RegisteredScriptPaths.FirstOrDefault(p => Path.GetFileNameWithoutExtension(p) == scriptName) ?? "";
8383
return !string.IsNullOrEmpty(path);
8484
}
8585

86-
public static bool DoesScriptExist(string path)
86+
public static bool DoesScriptExistByPath(string path)
8787
{
8888
UpdateScriptPathCollection();
8989

ScriptSystem/Structures/ScriptName.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static ScriptName InitUnchecked(string name)
2424

2525
public static TryGet<ScriptName> TryInit(string name)
2626
{
27-
if (!FileSystem.FileSystem.DoesScriptExist(name))
27+
if (!FileSystem.FileSystem.DoesScriptExistByName(name, out _))
2828
{
2929
return $"Script '{name}' does not exist in the SER folder or is inaccessible.";
3030
}

0 commit comments

Comments
 (0)