This commit is contained in:
2025-11-30 17:41:52 +00:00
parent 418df318ee
commit 266044215d

View File

@@ -250,7 +250,9 @@ export default class Updater {
progressCallback(`Sending (${Math.floor((this._fileProgress *100)/this._fileSize)}%), ${this._fileProgress} / ${this._fileSize}`);
} else if (dataView[0] == 2) {
// done logic
if (this._fileProgress >= this._fileSize) {
console.log(`progress >= filesize: ${this._fileProgress} vs ${this._fileSize}`);
if (this._fileProgress >= this._fileSize) {
console.log("true");
// send agree
await this.sendEndCmd(true);
progressCallback(`Complete!`);
@@ -265,6 +267,7 @@ export default class Updater {
}
);
} else {
console.log("False");
// send disagree
await this.sendEndCmd(false);
progressCallback(`Error, starting over: ${this._fileProgress} / ${this._fileSize}`);