From c6e17b199e3a584882bf972fec40bde7e1179556 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Mon, 15 Mar 2021 14:43:03 -0300 Subject: [PATCH] Fixed an issue where sometimes exporting a profile wouldn't work --- Libs/DF/LibDFramework-1.0.toc | 2 +- Libs/DF/fw.lua | 1 - classes/container_segments.lua | 4 ++-- core/gears.lua | 7 +++++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Libs/DF/LibDFramework-1.0.toc b/Libs/DF/LibDFramework-1.0.toc index a1ab4868d..699842414 100644 --- a/Libs/DF/LibDFramework-1.0.toc +++ b/Libs/DF/LibDFramework-1.0.toc @@ -1,4 +1,4 @@ -## Interface: 90002 +## Interface: 90005 ## Title: Lib: LibDFramework-1.0 ## Notes: Base Framework for many Addons diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index 0fd59e25c..b3fdaf8cc 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -328,7 +328,6 @@ end --> copy from table2 to table1 overwriting values but do not copy data that cannot be compressed function DF.table.copytocompress (t1, t2) for key, value in pairs (t2) do - print (key, value) if (key ~= "__index" and type(value) ~= "function") then if (type (value) == "table") then t1 [key] = t1 [key] or {} diff --git a/classes/container_segments.lua b/classes/container_segments.lua index 4457a7c0e..9636f7760 100644 --- a/classes/container_segments.lua +++ b/classes/container_segments.lua @@ -95,8 +95,8 @@ function historico:adicionar_overall (tabela) tinsert (_detalhes.tabela_overall.segments_added, 1, {name = combatName, elapsed = combatTime, clock = this_clock, type = combatType}) - if (#_detalhes.tabela_overall.segments_added > 30) then - tremove (_detalhes.tabela_overall.segments_added, 31) + if (#_detalhes.tabela_overall.segments_added > 40) then + tremove (_detalhes.tabela_overall.segments_added, 41) end if (_detalhes.debug) then diff --git a/core/gears.lua b/core/gears.lua index ed6d4cbe3..145d792d9 100644 --- a/core/gears.lua +++ b/core/gears.lua @@ -2328,9 +2328,12 @@ end function Details:CompressData (data, dataType) local LibDeflate = LibStub:GetLibrary ("LibDeflate") local LibAceSerializer = LibStub:GetLibrary ("AceSerializer-3.0") - + + --check if there isn't funtions in the data to export + local dataCopied = DetailsFramework.table.copytocompress({}, data) + if (LibDeflate and LibAceSerializer) then - local dataSerialized = LibAceSerializer:Serialize (data) + local dataSerialized = LibAceSerializer:Serialize (dataCopied) if (dataSerialized) then local dataCompressed = LibDeflate:CompressDeflate (dataSerialized, {level = 9}) if (dataCompressed) then