Failure while executing KTar::open while using KCompressionDevice as the device
Luiz Romário Santana Rios
luizromario at gmail.com
Tue Nov 3 01:23:03 UTC 2015
Em 02/11/2015 16:31, "Boudhayan Gupta" <bgupta at kde.org> escreveu:
>
> I'd first ascertain whether the file is corrupt.
I'm pretty sure the file is OK. As a workaround, I had to write the
downloaded contents into a temporary file, then extract the contents from
the temp file using KTar, but I have to change that, since it's bringing me
some problems. So, the problem isn't in the file.
> Why don't you dump
> the tar to a QFile and manually use tar -xvf to extract it, just to
> test whether the download is working?
>
> On 2 November 2015 at 23:23, Luiz Romário Santana Rios
> <luizromario at gmail.com> wrote:
> > Hello,
> >
> > I'm trying to decompress a XZ archive downloaded using
> > QNetworkAccessManager, so, according to the documents, I have to pass
> > the QNetworkReply pointer to a KCompressionDevice and, then, use it as
> > Ktar's device like this:
> >
> > https://gist.github.com/anonymous/b8fb686367f518a7dbb5
> >
> > The problem is that KTar::open() fails and returns false. The file I'm
> > trying to extract has the following structure more or less:
> > /root
> > /root/dir
> > /root/dir/file1
> > /root/dir/file2
> > ...
> >
> > So, as far as I've seen, the code runs normally when entering /root
> > and /root/dir, but, pretty high in the stack, at
> > KXzFilter::uncompress(), the call to lzma_code returns
> > LZMA_FORMAT_ERROR while trying to uncompress file1 (or file2, I'm not
> > sure). Here's the call stack:
> >
> > https://gist.github.com/anonymous/9ea380cfe48daadb5971
> >
> > Is this a bug? If it's a bug, how can I proceed to fix it?
> >
> > Thanks for the attention.
> >
> > --
> > Luiz Romário Santana Rios
> > _______________________________________________
> > Kde-frameworks-devel mailing list
> > Kde-frameworks-devel at kde.org
> > https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
> _______________________________________________
> Kde-frameworks-devel mailing list
> Kde-frameworks-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20151102/ae535916/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list