made directory mode recursive

This commit is contained in:
ObiYKenobi
2025-09-22 19:45:25 -04:00
parent a170f57040
commit dcf543b4f8
+8 -2
View File
@@ -111,12 +111,18 @@ if directoryMode then
end
-- read directory and collect .rbxm and .rbxmx files
for _, file in pairs(fs.readDir(directoryPath)) do
local fullPath = directoryPath .. "/" .. file
local function readDirLoop(dirPath)
for _, file in pairs(fs.readDir(dirPath)) do
local fullPath = dirPath .. "/" .. file
if fs.isFile(fullPath) and isValidModelFile(file) then
table.insert(filesToProcess, fullPath)
elseif fs.isDir(fullPath) then
readDirLoop(fullPath)
end
end
end
readDirLoop(directoryPath)
if #filesToProcess == 0 then
stdio.write(stdio.color("yellow"))