Fix security permission error (#619)

This commit is contained in:
boatbomber
2022-08-10 12:57:24 -07:00
committed by GitHub
parent 4cb49c7825
commit 142705f386

View File

@@ -115,9 +115,13 @@ local function diff(instanceMap, virtualInstances, rootId)
local childId = instanceMap.fromInstances[childInstance]
if childId == nil then
if childInstance.Archivable == false then
-- pcall to avoid security permission errors
local success, skip = pcall(function()
-- We don't remove instances that aren't going to be saved anyway,
-- such as the Rojo session lock value.
return childInstance.Archivable == false
end)
if success and skip then
continue
end