Merge pull request #3 from ObiYKenobi/main
made directory mode recursive
This commit is contained in:
+8
-2
@@ -111,12 +111,18 @@ if directoryMode then
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- read directory and collect .rbxm and .rbxmx files
|
-- read directory and collect .rbxm and .rbxmx files
|
||||||
for _, file in pairs(fs.readDir(directoryPath)) do
|
local function readDirLoop(dirPath)
|
||||||
local fullPath = directoryPath .. "/" .. file
|
for _, file in pairs(fs.readDir(dirPath)) do
|
||||||
|
local fullPath = dirPath .. "/" .. file
|
||||||
if fs.isFile(fullPath) and isValidModelFile(file) then
|
if fs.isFile(fullPath) and isValidModelFile(file) then
|
||||||
table.insert(filesToProcess, fullPath)
|
table.insert(filesToProcess, fullPath)
|
||||||
|
elseif fs.isDir(fullPath) then
|
||||||
|
readDirLoop(fullPath)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
readDirLoop(directoryPath)
|
||||||
|
|
||||||
if #filesToProcess == 0 then
|
if #filesToProcess == 0 then
|
||||||
stdio.write(stdio.color("yellow"))
|
stdio.write(stdio.color("yellow"))
|
||||||
|
|||||||
Reference in New Issue
Block a user