[tepl] FileMetadata: fix a small fixme



commit 24f609edfae05736a85753366672484c34b49565
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Apr 2 15:59:39 2020 +0200

    FileMetadata: fix a small fixme
    
    At that point in the code, file_info cannot be NULL normally, otherwise
    it's a GIO bug. So simplify the code.

 tepl/tepl-file-metadata.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/tepl/tepl-file-metadata.c b/tepl/tepl-file-metadata.c
index 3085f91..9a00b92 100644
--- a/tepl/tepl-file-metadata.c
+++ b/tepl/tepl-file-metadata.c
@@ -250,16 +250,11 @@ load_metadata_async_cb (GObject      *source_object,
                return;
        }
 
-       if (file_info == NULL)
+       if (file_info != NULL)
        {
-               /* FIXME: return TRUE instead? */
-               g_task_return_boolean (task, FALSE);
-               g_object_unref (task);
-               return;
+               g_set_object (&priv->file_info, file_info);
        }
 
-       g_set_object (&priv->file_info, file_info);
-
        g_task_return_boolean (task, TRUE);
        g_object_unref (task);
 }


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