[Issue 1832] reading/writing an archive causes data loss; std.zip horribly broken

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 6 01:08:06 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=1832



--- Comment #9 from Martin Nowak <code at dawg.eu> 2013-12-06 01:07:58 PST ---
(In reply to comment #8)
> This is another bug. m1 is owned by a1. m1._compressedData refers to data
> inside a1. So you're mixing data from two different objects/archives. I don't
> think it's a good idea. When you build a2, it tries to read compressed data
> from a2 data, but it should read from a1.
>
I see.

> There's a simply workaround, but again, there's a problem on library design. If
> m1 is just compressed, we can read content it has inside _compressedData, if
> any. It filled it before with right reference to a1 data. This solve your bug,
> but probalby don't solve the mixing problem and of course it's not an elegant
> solution!
>
I think m1._compressedData is simply a slice to (constant) GC memory which was
allocated when reading a1. So here shouldn't be any problem to copy this data
into a new zip archive.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list