tools: Never try to propose same URI when we know it is missing URI
authorThibault Saunier <tsaunier@gnome.org>
Fri, 31 Oct 2014 10:32:37 +0000 (11:32 +0100)
committerThibault Saunier <tsaunier@gnome.org>
Mon, 10 Nov 2014 15:22:42 +0000 (16:22 +0100)
tools/ges-launch.c

index 9ac7cac..001b305 100644 (file)
@@ -186,7 +186,9 @@ ges_launch_get_new_uri_from_wrong_uri (const gchar * old_uri)
     res = g_build_filename (new_paths->pdata[i], basename, NULL);
     g_free (basename);
 
-    if (g_hash_table_lookup (tried_uris, res)) {
+    if (g_strcmp0 (old_uri, res) == 0) {
+      g_hash_table_add (tried_uris, res);
+    } else if (g_hash_table_lookup (tried_uris, res)) {
       GST_DEBUG ("File already tried: %s\n", res);
       g_free (res);
     } else {