tests: fix passing of URIs containing '*' and '?' to the seek example
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 9 Sep 2010 19:45:38 +0000 (20:45 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 9 Sep 2010 19:52:17 +0000 (20:52 +0100)
Only do wildcard expansion (why?!) on things that look like local
file paths. Fixes passing of URIs containing '*' and '?' (see #629212).

tests/examples/seek/seek.c

index 633a4a2..3baddcc 100644 (file)
@@ -2661,8 +2661,9 @@ main (int argc, char **argv)
 
   pipeline_spec = argv[2];
 
-  if (g_strrstr (pipeline_spec, "*") != NULL ||
-      g_strrstr (pipeline_spec, "?") != NULL) {
+  if (g_path_is_absolute (pipeline_spec) &&
+      (g_strrstr (pipeline_spec, "*") != NULL ||
+          g_strrstr (pipeline_spec, "?") != NULL)) {
     paths = handle_wildcards (pipeline_spec);
   } else {
     paths = g_list_prepend (paths, g_strdup (pipeline_spec));