cleaned up file stuff in ExportLevel

This commit is contained in:
binarycat 2022-03-05 14:00:27 -05:00
parent 70958c5762
commit 8cfc6a9d18

View File

@ -1,7 +1,9 @@
function ExportLevel(levelname, filename)
os.execute( "mkdir \"./export\"" )
love.filesystem.createDirectory("export")
filename = filename or "output.lua"
filename = "export/"..filename
if string.sub(filename, 1, 1) ~= "/" then
filename = "export/"..filename
end
exportFile = io.open(filename, "w+")
if exportFile then