diff --git a/src/Terminal.jsx b/src/Terminal.jsx index 1d8000331..27fb2acc9 100644 --- a/src/Terminal.jsx +++ b/src/Terminal.jsx @@ -965,7 +965,8 @@ let Terminal = { } const server = Player.getCurrentServer(); - if(!server.scripts.some(script => script.filename.startsWith(evaledDir))) { + if(!server.scripts.some(script => script.filename.startsWith(evaledDir)) && + !server.textFiles.some(file => file.fn.startsWith(evaledDir))) { postError("Invalid path. Failed to change directories"); return; }