From 3b29d10443b7d353208cc07589a90c4c09cc7ab6 Mon Sep 17 00:00:00 2001 From: Callie <71226959+chemiclast@users.noreply.github.com> Date: Fri, 23 Jun 2023 16:00:15 -0500 Subject: [PATCH] Fix file extension checking in remodel shim (#59) --- docs/modules/remodel.luau | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/modules/remodel.luau b/docs/modules/remodel.luau index 872ac3b..81830d9 100644 --- a/docs/modules/remodel.luau +++ b/docs/modules/remodel.luau @@ -224,7 +224,7 @@ end Models should be saved with `writeModelFile` instead. ]=] function remodel.writePlaceFile(filePath: string, dataModel: LuneDataModel) - local asBinary = string.sub(filePath, -6) == ".rbxl" + local asBinary = string.sub(filePath, -5) == ".rbxl" local asXml = string.sub(filePath, -6) == ".rbxlx" assert(asBinary or asXml, "File path must have .rbxl or .rbxlx extension") local placeFile = roblox.serializePlace(dataModel, asXml) @@ -238,7 +238,7 @@ end Places should be saved with `writePlaceFile` instead. ]=] function remodel.writeModelFile(filePath: string, instance: LuneInstance) - local asBinary = string.sub(filePath, -6) == ".rbxm" + local asBinary = string.sub(filePath, -5) == ".rbxm" local asXml = string.sub(filePath, -6) == ".rbxmx" assert(asBinary or asXml, "File path must have .rbxm or .rbxmx extension") local placeFile = roblox.serializeModel({ instance }, asXml)