Skip to content

Commit

Permalink
Use different way to filter pgp sig files
Browse files Browse the repository at this point in the history
The brace glob() returns result sorted by extension
groups and we don't want that.
  • Loading branch information
zoffixznet committed Nov 30, 2016
1 parent 42ca829 commit f52241f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions download-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@ function make_sig($file) {
return ' <a href="/' . $sig . '" class="sig">PGP</a>';
}

$files = array_reverse(glob(
$asset['path'] . '*.{msi,dmg,tar.gz,zip}',
GLOB_BRACE
));
$files = array();
foreach (glob($asset['path'] . '*') as $file) {
$info = pathinfo($file);
if ($info["extension"] == "asc") { continue; }
array_unshift($files, $file);
}

foreach (array_keys($asset['vars']) as $variant) {
foreach ($files as $file) {
if ( substr($file, -strlen($variant)) !== $variant ) {
Expand Down

0 comments on commit f52241f

Please sign in to comment.