local function searchFolder(list, progName, startPath, debug)
for _, v in pairs(list) do
path = (startPath == "/") and startPath..v or startPath.."/"..v
print(path)
if v == progName and not fs.isDir(path) then
if debug then print("File path found.") end
return path
elseif fs.isDir(path) then
return searchFolder(fs.list(path), progName, path, debug)
end
end
return "Not Found"
end
local function resolveProgramPath(progName, startPath, debug)
return searchFolder(fs.list(startPath), progName, startPath, debug)
end
progPath = resolveProgramPath(progName, "/", debug)
print("The programs path is "..progPath)
it seems to always print out "Not Found" even thought previously it printed "File path found"... it seems its not returning down the stack properly and I cant see why, I figure fresh eyes will help












