![]() Registered Member ![]()
|
Hello,
I have the following code:
The file package.xml exists, as it is outputed by the first line, but the third line generates this error:
I've also tried packageFile->createDevice()->readAll(), but I still got the first two errors. Any ideas? I'm on Ubuntu 12.04 (64 bit) Jan |
![]() Administrator ![]()
|
Can you please post as much of your complete code as possible, and upload the archive you are trying to read somewhere so people can look into this?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Ok, here is a very simple code that compiles and creates the errors:
KArchiveTest.pro:
Jan Edit: Here is the archive I used for testing: https://www.dropbox.com/s/zoaby1ksrhdy5v5/test.tar.gz |
![]() Administrator ![]()
|
I can confirm this using your test suite.
I got this backtrace:
I'll pass this information on to the appropriate person(s) to see if they may know what the issue is.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
|
![]() Administrator ![]()
|
The maintainer of the KArchive code has let me know they will look into finding a solution to this issue this week (spare time permitting).
I'll update this topic when that happens.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() KDE Developer ![]()
|
There are two issues with this testcase:
1) Your .tar.gz file is actually not gzipped, it's a wrongly named uncompressed tar file. See "file test.tar.gz" for proof. 2) The code, on the other hand, forces the use of a KFilterDev for gunzipping as input device. This is unnecessary -- even if the input file was really gzipped -- because KTar is perfectly capable of handling real .tar.gz files as input. 3) (Yeah I can't count). Deleting "file" and "root" is wrong, these are owned by KTar. This leads to the following working code:
|
Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]