GNOME Bugzilla – Bug 611057
gvfsd-archive should not rely on errno to detect errors.
Last modified: 2010-02-26 15:33:37 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.
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.
I did not test that patch, which is why I didn't apply it. Please report back if it works.
It works, please commit! =)
done