[nautilus] window-slot: use g_error_matches



commit 94fd7f94e3ddef5ee3ef58d06cc2f5c71f16676a
Author: Carlos Soriano <csoriano gnome org>
Date:   Thu Aug 20 22:16:20 2015 +0200

    window-slot: use g_error_matches
    
    And add a comment to track this...
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753871

 src/nautilus-window-slot.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 1287308..88d0cfe 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -1215,7 +1215,8 @@ got_file_info_for_view_selection_callback (NautilusFile *file,
 
         view = NULL;
 
-        if (!error || (error && error->domain == G_IO_ERROR && error->code == G_IO_ERROR_NOT_SUPPORTED)) {
+        /* why do we accept ERROR_NOT_SUPPORTED? */
+        if (!error || g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED)) {
                 view = nautilus_window_slot_get_view_for_location (slot, location);
        }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]