from retail
This commit is contained in:
@@ -302,19 +302,24 @@ function StringToTable(inString, fromChat)
|
||||
end
|
||||
|
||||
if not decoded then
|
||||
return "Error decoding."
|
||||
return L["Error decoding."]
|
||||
end
|
||||
|
||||
local decompressed, errorMsg = nil, "unknown compression method"
|
||||
local decompressed
|
||||
if encodeVersion > 0 then
|
||||
decompressed = LibDeflate:DecompressDeflate(decoded)
|
||||
if not(decompressed) then
|
||||
return L["Error decompressing"]
|
||||
end
|
||||
else
|
||||
decompressed, errorMsg = Compresser:Decompress(decoded)
|
||||
end
|
||||
if not(decompressed) then
|
||||
return "Error decompressing: " .. errorMsg
|
||||
-- We ignore the error message, since it's more likely not a weakaura.
|
||||
decompressed = Compresser:Decompress(decoded)
|
||||
if not(decompressed) then
|
||||
return L["Error decompressing. This doesn't look like a WeakAuras import."]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local success, deserialized
|
||||
if encodeVersion < 2 then
|
||||
success, deserialized = Serializer:Deserialize(decompressed)
|
||||
@@ -322,7 +327,7 @@ function StringToTable(inString, fromChat)
|
||||
success, deserialized = LibSerialize:Deserialize(decompressed)
|
||||
end
|
||||
if not(success) then
|
||||
return "Error deserializing "..deserialized
|
||||
return L["Error deserializing"]
|
||||
end
|
||||
return deserialized
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user