mirror of https://github.com/BOINC/boinc.git
update_versions: handle files that are both gzipped and replicated
This commit is contained in:
parent
562edbed3f
commit
4850d0236c
|
@ -89,6 +89,7 @@ function file_info_xml($fd) {
|
|||
if (is_array($fd->url)) {
|
||||
foreach ($fd->url as $url) {
|
||||
$xml .= " <url>$url</url>\n";
|
||||
$xml .= " <gzipped_url>$url.gz</gzipped_url>\n";
|
||||
}
|
||||
} else {
|
||||
$xml .= " <url>$fd->url</url>\n";
|
||||
|
@ -170,7 +171,9 @@ function stage_file($a, $v, $p, $fd) {
|
|||
system("cp $path $dl_path");
|
||||
}
|
||||
|
||||
$fd->url = "$download_url/$name";
|
||||
if (!sizeof($fd->url)) {
|
||||
$fd->url = "$download_url/$name";
|
||||
}
|
||||
if ($fd->gzip) {
|
||||
if (!file_exists("$dl_path.gz")) {
|
||||
$tmp = "$dl_path.tmp";
|
||||
|
@ -256,9 +259,7 @@ function process_file($a, $v, $p, $name, $fds) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!sizeof($fd->url)) {
|
||||
$fd = stage_file($a, $v, $p, $fd);
|
||||
}
|
||||
$fd = stage_file($a, $v, $p, $fd);
|
||||
|
||||
if (!isset($fd->executable)) {
|
||||
$perms = fileperms($path);
|
||||
|
|
Loading…
Reference in New Issue