mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-09 07:56:06 +02:00
Convert import statement path from safe string before combining paths
This commit is contained in:
@@ -82,6 +82,7 @@ internal partial class ProcessingStatements : StatementRuntimeInformation
|
|||||||
[Statement("import", SearchMode.StartOfLine, SpaceAround.End, ConsoleColor.Magenta)]
|
[Statement("import", SearchMode.StartOfLine, SpaceAround.End, ConsoleColor.Magenta)]
|
||||||
public void Import(string path)
|
public void Import(string path)
|
||||||
{
|
{
|
||||||
|
path = path.FromSafeString();
|
||||||
path = Path.Combine(RuntimeInfo.WorkingDirectory, path);
|
path = Path.Combine(RuntimeInfo.WorkingDirectory, path);
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(Path.GetExtension(path)))
|
if (string.IsNullOrEmpty(Path.GetExtension(path)))
|
||||||
|
|||||||
Reference in New Issue
Block a user