[rhythmbox] lib: fix error handling in rb_uri_handle_recursively_async



commit 0765c38046d3af885f67f037e2dfec36c5112f5b
Author: Jonathan Matthew <jonathan d14n org>
Date:   Wed Nov 27 12:25:20 2013 +1000

    lib: fix error handling in rb_uri_handle_recursively_async
    
    When we're not passed a directory to crawl, we need to clear the
    error before checking the file we got instead.

 lib/rb-file-helpers.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/lib/rb-file-helpers.c b/lib/rb-file-helpers.c
index 156efa7..a309cc3 100644
--- a/lib/rb-file-helpers.c
+++ b/lib/rb-file-helpers.c
@@ -925,6 +925,7 @@ _uri_handle_recursively_enum_files (GObject *src, GAsyncResult *result, gpointer
                if (error->code == G_IO_ERROR_NOT_DIRECTORY) {
                        GFileInfo *info;
 
+                       g_clear_error (&error);
                        info = g_file_query_info (G_FILE (src), recurse_attributes, G_FILE_QUERY_INFO_NONE, 
data->cancel, &error);
                        if (error == NULL) {
                                if (_should_process (info)) {


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