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 786168 - mime-actions: null-check app info
mime-actions: null-check app info
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-11 17:26 UTC by Ernestas Kulik
Modified: 2017-08-11 19:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mime-actions: null-check app info (1.49 KB, patch)
2017-08-11 17:26 UTC, Ernestas Kulik
committed Details | Review

Description Ernestas Kulik 2017-08-11 17:26:37 UTC
When deciding on the activation action, the code checks if Nautilus
is the default handler for archives. There are cases when the returned
application info is invalid, e.g. for application/octet-stream.
Comment 1 Ernestas Kulik 2017-08-11 17:26:44 UTC
Created attachment 357432 [details] [review]
mime-actions: null-check app info
Comment 2 Carlos Soriano 2017-08-11 18:46:40 UTC
Review of attachment 357432 [details] [review]:

Thanks!

::: src/nautilus-mime-actions.c
@@ +717,2 @@
     app_info = nautilus_mime_get_default_application_for_file (file);
+    /* This will be usually be null for octet streams. */

"be usually be" -> will usually be. But the comment is not necesary, NULL is just expected and part of the API, it's just my fault.
Comment 3 Ernestas Kulik 2017-08-11 19:16:25 UTC
Attachment 357432 [details] pushed as cd78b1c - mime-actions: null-check app info