mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-08 23:43:18 +02:00
Use correct directory when importing other file
This commit is contained in:
@@ -86,6 +86,8 @@ namespace YesNt.Interpreter.Statements
|
||||
[Statement("imp", SearchMode.StartOfLine, SpaceAround.End, ConsoleColor.Magenta)]
|
||||
public void Import(string path)
|
||||
{
|
||||
path = Path.Combine(RuntimeInfo.WorkingDirectory, path);
|
||||
|
||||
if (string.IsNullOrEmpty(Path.GetExtension(path)))
|
||||
{
|
||||
path = Path.ChangeExtension(path, "ynt");
|
||||
|
||||
Reference in New Issue
Block a user