Skip to content

Commit

Permalink
修正 web 有时读取不到版本号的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
hightman committed Jan 10, 2013
1 parent 913aa0a commit 5931e1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/header.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
//
// load version from down files automatically
$version = false;
$files = glob("down/scws-*.tar.bz2");
$files = glob(dirname(__FILE__) . "/down/scws-*.tar.bz2");
foreach ($files as $file)
{
$pos1 = strpos($file, '-') + 1;
$pos1 = strpos($file, 'scws-') + 5;
$pos2 = strpos($file, '.tar');
$ver = substr($file, $pos1, $pos2 - $pos1);
if (!$version || version_compare($ver, $version) > 0)
Expand Down

0 comments on commit 5931e1a

Please sign in to comment.