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 752366 - ARCHIVE_FAILED error isn't handled
ARCHIVE_FAILED error isn't handled
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: archive backend
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2015-07-14 10:48 UTC by Ondrej Holy
Modified: 2015-08-04 08:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
archive: Handle ARCHIVE_FAILED error (3.24 KB, patch)
2015-07-14 10:48 UTC, Ondrej Holy
none Details | Review
archive: Handle ARCHIVE_FAILED error (3.29 KB, patch)
2015-07-21 11:48 UTC, Ondrej Holy
committed Details | Review

Description Ondrej Holy 2015-07-14 10:48:17 UTC
Created attachment 307400 [details] [review]
archive: Handle ARCHIVE_FAILED error

Archive backend is stucked in endless loop currently e.g. if you try to mount encrypted zip file. It is caused because ARCHIVE_FAILED error is not handled, when reading data from the archive.

ARCHIVE_FAILED is handled with the attached patch. The patch cause that mount job doesn't fail, just because of unknown file size, but open_for_read job fails if ARCHIVE_FAILED is returned.
Comment 1 Ondrej Holy 2015-07-14 10:49:32 UTC
It was reported downstream originally:
https://bugzilla.redhat.com/show_bug.cgi?id=1242397
Comment 2 Ross Lagerwall 2015-07-19 08:14:43 UTC
Review of attachment 307400 [details] [review]:

::: daemon/gvfsbackendarchive.c
@@ +491,3 @@
+
+  if (size < 0)
+    g_file_info_set_size (info, size);

Shouldn't this be: if (size >= 0)
Comment 3 Ondrej Holy 2015-07-21 11:48:42 UTC
Created attachment 307825 [details] [review]
archive: Handle ARCHIVE_FAILED error

(In reply to Ross Lagerwall from comment #2)
> Review of attachment 307400 [details] [review] [review]:
> 
> ::: daemon/gvfsbackendarchive.c
> @@ +491,3 @@
> +
> +  if (size < 0)
> +    g_file_info_set_size (info, size);
> 
> Shouldn't this be: if (size >= 0)

Dammit, have to be, thanks...
Comment 4 Ross Lagerwall 2015-08-04 06:27:30 UTC
Review of attachment 307825 [details] [review]:

Looks good.
Comment 5 Ondrej Holy 2015-08-04 08:30:13 UTC
Comment on attachment 307825 [details] [review]
archive: Handle ARCHIVE_FAILED error

Thanks for review. It has been pushed to master (commit fb60a7e) and gnome-3-16 (commit c758ab5).