镜像自地址
https://github.com/JGZYES/ParlzPackageManger.git
已同步 2026-09-11 05:42:44 +08:00
git.php: local_asset also checks web root (install.sh) for release asset links
这个提交包含在:
+5
-3
@@ -73,10 +73,12 @@ function gh_api(string $url): array {
|
|||||||
}
|
}
|
||||||
/* Prefer a local copy of a release asset on this server; fall back to GitHub. */
|
/* Prefer a local copy of a release asset on this server; fall back to GitHub. */
|
||||||
function local_asset(string $name): ?string {
|
function local_asset(string $name): ?string {
|
||||||
foreach ([__DIR__ . '/downloads/' . $name, __DIR__ . '/mirror/packages/pmm/' . $name] as $p) {
|
$cands = [__DIR__ . '/downloads/' . $name, __DIR__ . '/mirror/packages/pmm/' . $name, __DIR__ . '/' . $name];
|
||||||
if (@is_file($p)) {
|
|
||||||
$base = realpath(__DIR__);
|
$base = realpath(__DIR__);
|
||||||
return '/' . str_replace('\\', '/', substr(str_replace('\\', '/', realpath($p)), strlen($base) + 1));
|
foreach ($cands as $p) {
|
||||||
|
if (@is_file($p)) {
|
||||||
|
$rp = realpath($p);
|
||||||
|
return '/' . str_replace('\\', '/', substr(str_replace('\\', '/', $rp), strlen($base) + 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户