mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-07-27 22:32:53 +00:00
Allow having a startup directory and a startup.lua file simultaneously
This commit is contained in:
parent
2e7c9b163d
commit
962e419098
@ -215,12 +215,15 @@ local function findStartups( sBaseDir )
|
|||||||
local sStartupNode = shell.resolveProgram( sBasePath )
|
local sStartupNode = shell.resolveProgram( sBasePath )
|
||||||
if sStartupNode then
|
if sStartupNode then
|
||||||
tStartups = { sStartupNode }
|
tStartups = { sStartupNode }
|
||||||
else
|
end
|
||||||
if fs.isDir( sBasePath ) then
|
-- It's possible that there is a startup directory and a startup.lua file, so this has to be
|
||||||
|
-- executed even if a file has already been found.
|
||||||
|
if fs.isDir( sBasePath ) then
|
||||||
|
if tStartups == nil then
|
||||||
tStartups = {}
|
tStartups = {}
|
||||||
for _,v in pairs( fs.list( sBasePath ) ) do
|
end
|
||||||
tStartups[ #tStartups + 1 ] = shell.resolveProgram( "/" .. fs.combine( sBasePath, v ) )
|
for _,v in pairs( fs.list( sBasePath ) ) do
|
||||||
end
|
tStartups[ #tStartups + 1 ] = shell.resolveProgram( "/" .. fs.combine( sBasePath, v ) )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return tStartups
|
return tStartups
|
||||||
|
Loading…
x
Reference in New Issue
Block a user