After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 611057 - gvfsd-archive should not rely on errno to detect errors.
gvfsd-archive should not rely on errno to detect errors.
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: archive backend
unspecified
Other Linux
: Normal major
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2010-02-25 10:34 UTC by Andreas Henriksson
Modified: 2010-02-26 15:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
archive: Use archive_errno() the correct way (2.40 KB, patch)
2010-02-25 11:12 UTC, Benjamin Otte (Company)
none Details | Review

Description Andreas Henriksson 2010-02-25 10:34:28 UTC
Please see:
http://code.google.com/p/libarchive/issues/detail?id=67

Comment from libarchive author:

"I believe this is a gvfs bug.  According to the gentoo bug report, gvfs ignores the
return code from archive_read_next_header() and instead checks archive_errno() to see
if an error occurred.  Archive_errno() is not meaningful except immediately after an
error is returned from an API call."



As noted in the Gentoo bug report mentioned in the referenced url above (and confirmed by myself) the problem in gfvsd-archive is triggered when libarchive is compiled without lzma support.
Comment 1 Benjamin Otte (Company) 2010-02-25 11:12:50 UTC
Created attachment 154672 [details] [review]
archive: Use archive_errno() the correct way

Previous code was assuming that archive_errno() would report the last
error that happened or SUCCESS if none. This is not true, however as the
return value of archive_errno() is undefined if no error happened.
This patch changes it to only call archive_errno() after errors.
Comment 2 Benjamin Otte (Company) 2010-02-25 11:16:22 UTC
I did not test that patch, which is why I didn't apply it. Please report back if it works.
Comment 3 Andreas Henriksson 2010-02-26 10:07:53 UTC
It works, please commit! =)
Comment 4 Benjamin Otte (Company) 2010-02-26 15:33:37 UTC
done