+ gchar *local_path = g_filename_from_uri(uris[i], NULL, &error);
+ if (error)
+ {
+ DEBUG_1("g_filename_from_uri failed on uri \"%s\"", uris[i]);
+ DEBUG_1(" error %d: %s", error->code, error->message);
+ if (error->code == G_CONVERT_ERROR_BAD_URI)
+ {
+ GError *retry_error = NULL;
+ gchar *escaped = g_uri_escape_string(uris[i], ":/", TRUE);
+ local_path = g_filename_from_uri(escaped, NULL, &retry_error);
+ if(retry_error)
+ {
+ DEBUG_1("manually escaped uri \"%s\" also failed g_filename_from_uri", escaped);
+ DEBUG_1(" error %d: %s", retry_error->code, retry_error->message);
+ g_error_free(retry_error);
+ }
+ g_free(escaped);
+ }
+ g_error_free(error);
+ error = NULL;
+ if (!local_path)
+ {
+ *uri_error_list = g_list_prepend(*uri_error_list, g_strdup(uris[i]));
+ i++;
+ continue;
+ }
+ }