mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-21 12:19:58 -04:00
Resume a part file only for the file it was begun for.
A part left by a download of other bytes under the same name was resumed, and the result failed its sha256 check as if the download were damaged. A note beside the part now names the file it belongs to by the expected sha256; a part of another file is deleted with a log line and the download starts over, and the same file is still resumed from another server. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -531,10 +531,10 @@ class UpdateDownloadJob(Job):
|
||||
self.begin('download')
|
||||
prog = lambda d, t: self.progress('download', d / max(t, 1), f'{d / 1e6:.1f} of {t / 1e6:.1f} MB') # noqa: E731
|
||||
folder = updater.stage_app(layout, self.release, progress=prog, cancel=self.cancelled,
|
||||
version=self.ctx.version)
|
||||
version=self.ctx.version, log=self.log)
|
||||
if updater.runtime_needed(layout, self.release):
|
||||
updater.stage_runtime(layout, self.release, progress=prog, cancel=self.cancelled,
|
||||
version=self.ctx.version)
|
||||
version=self.ctx.version, log=self.log)
|
||||
self.finish('download')
|
||||
self.begin('verify')
|
||||
if not (folder / 'launcher' / 'start.pyw').is_file():
|
||||
@@ -609,7 +609,8 @@ class StageJob(Job):
|
||||
winsys.background_thread()
|
||||
self.begin('download')
|
||||
prog = lambda d, t: self.progress('download', d / max(t, 1), f'{d / 1e6:.1f} of {t / 1e6:.1f} MB') # noqa: E731
|
||||
updater.stage(self.ctx.layout, self.release, progress=prog, cancel=self.cancelled, version=self.ctx.version)
|
||||
updater.stage(self.ctx.layout, self.release, progress=prog, cancel=self.cancelled, version=self.ctx.version,
|
||||
log=self.log)
|
||||
self.finish('download')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user