Skip to content

Commit

Permalink
Fixed an issue where sometimes exporting a profile wouldn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Mar 15, 2021
1 parent 0894977 commit c6e17b1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Libs/DF/LibDFramework-1.0.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 90002
## Interface: 90005
## Title: Lib: LibDFramework-1.0
## Notes: Base Framework for many Addons

Expand Down
1 change: 0 additions & 1 deletion Libs/DF/fw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand Down
4 changes: 2 additions & 2 deletions classes/container_segments.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions core/gears.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c6e17b1

Please sign in to comment.