| … | … | @@ -353,7 +353,17 @@ export async function swarmFetcher ({ registryKeyHex = DEFAULT_REGISTRY, repo = |
| 353 | 353 | const latest = opts_latest || await getLatestRelease(repo) |
| 354 | 354 | if (!latest || !latest.serverKey) throw new Error('no published release with a serverKey for ' + repo) |
| 355 | 355 | |
| 356 | | const fetcher = new NetworkFetcher({ topic: latest.serverKey, timeout, destDir, swarm }) |
| 356 | // ⛔ localRegistryDir, THE SECOND HOMEDIR IN THIS PATH. NetworkFetcher defaults it to |
| 357 | // `homedir()/.config/pgh/release-registry` and stats it — on Android that is `/data/config/…`, |
| 358 | // which an unprivileged app cannot stat at all, so it throws rather than returning false. |
| 359 | // |
| 360 | // ⚠ IT WAS MASKED. In 0.0.10 `resolveRelease`'s own homedir default failed FIRST, so fixing that |
| 361 | // one simply moved the ENOENT here and it looked like the same bug returning. Two independent |
| 362 | // defaults, one symptom — which is why the fix has to be "no homedir anywhere in this path" |
| 363 | // rather than "fix the one that threw". |
| 364 | const fetcher = new NetworkFetcher({ |
| 365 | topic: latest.serverKey, timeout, destDir, swarm, localRegistryDir: path.join(destDir, '..', 'registry-local') |
| 366 | }) |
| 357 | 367 | // NetworkFetcher's own getLatestRelease reads a LOCAL registry, which a phone does not have. Its header |
| 358 | 368 | // calls the replacement a follow-on; the follow-on is the resolver above, and this is the same |
| 359 | 369 | // substitution runtime-factory makes for the same reason. |