mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-15 10:21:45 -04:00
Made getMatchingPrograms more accurate
This commit is contained in:
parent
4f91f00b55
commit
f39b501b1a
@ -160,7 +160,7 @@ local function getMatchingPrograms(pattern)
|
||||
local res = {}
|
||||
for dir in string.gmatch(os.getenv("PATH"), "[a-zA-Z0-9/.]+") do
|
||||
for file in fs.list(dir) do
|
||||
if string.match("/" .. file, "/" .. pattern) and file:match("(.+)[.]lua") then
|
||||
if string.match(file, "^" .. pattern .. "(.+)[.]lua") then
|
||||
res[#res+1] = file:match("(.+).lua")
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user