Fixed deserialize error incase of encountering BASE64 data

This commit is contained in:
ObiYKenobi
2025-09-22 19:18:50 -04:00
parent 430c89f189
commit 364e739369
+4 -1
View File
@@ -32,7 +32,10 @@ end
-- takes in fileContents as a string and deserializes them returning the results of scanForWorkspace() on the deserialized model -- takes in fileContents as a string and deserializes them returning the results of scanForWorkspace() on the deserialized model
function fileContainsWorkspace(fileContents: string): boolean function fileContainsWorkspace(fileContents: string): boolean
local instances = roblox.deserializeModel(fileContents) local success, instances = pcall(function() return roblox.deserializeModel(fileContents) end)
if not success then -- roblox doesn't like seeing <binary> files, so this is a work-around
return string.find(fileContents, "Item class=\"Workspace\"") and true or false
end
return scanForWorkspace(instances) return scanForWorkspace(instances)
end end