mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-11-14 22:04: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 )
|
||||
if sStartupNode then
|
||||
tStartups = { sStartupNode }
|
||||
else
|
||||
if fs.isDir( sBasePath ) then
|
||||
end
|
||||
-- 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 = {}
|
||||
for _,v in pairs( fs.list( sBasePath ) ) do
|
||||
tStartups[ #tStartups + 1 ] = shell.resolveProgram( "/" .. fs.combine( sBasePath, v ) )
|
||||
end
|
||||
end
|
||||
for _,v in pairs( fs.list( sBasePath ) ) do
|
||||
tStartups[ #tStartups + 1 ] = shell.resolveProgram( "/" .. fs.combine( sBasePath, v ) )
|
||||
end
|
||||
end
|
||||
return tStartups
|
||||
|
Loading…
Reference in New Issue
Block a user