mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 11:48:02 -04:00
fixed path resolving in shell (not always looking in current dir first)
This commit is contained in:
parent
6ed12e4f79
commit
3f8798f1f6
@ -51,9 +51,10 @@ local function findFile(name, ext)
|
||||
if unicode.sub(name, 1, 1) == "/" then
|
||||
local found, where = findIn("/")
|
||||
if found then return where end
|
||||
else
|
||||
elseif unicode.sub(name, 1, 2) == "./" then
|
||||
local found, where = findIn(shell.getWorkingDirectory())
|
||||
if found then return where end
|
||||
else
|
||||
for path in string.gmatch(shell.getPath(), "[^:]+") do
|
||||
local found, where = findIn(path)
|
||||
if found then return where end
|
||||
|
Loading…
x
Reference in New Issue
Block a user