*** empty log message ***
diff --git a/downloads/buildIndex.php b/downloads/buildIndex.php
index 03c7440..c113c2a 100755
--- a/downloads/buildIndex.php
+++ b/downloads/buildIndex.php
@@ -53,7 +53,7 @@
$i = strpos($template, "|");
if ($i === FALSE || $i == (strlen($template) - 1))
return startsWith($source, $template);
- $beginning = strstr($template, "|");
+ $beginning = substr($template, 0, $i);
printf($beginning);
$end = substr($template, $i + 1);
return startsWith($source, $beginning) && endsWith($source, $end);