Skip to content

Commit

Permalink
fix(nsis): prevent a missing package.7z from nuking the application
Browse files Browse the repository at this point in the history
  • Loading branch information
developeryashraj authored and develar committed Jun 24, 2018
1 parent 0cdb1c4 commit 3372008
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/electron-updater/src/DownloadedUpdateHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ export class DownloadedUpdateHelper {
}

async validateDownloadedPath(updateFile: string, versionInfo: UpdateInfo, fileInfo: ResolvedUpdateFileInfo, logger: Logger): Promise<boolean> {
if (this.versionInfo != null && this.file === updateFile) {
if (this.versionInfo != null && this.file === updateFile && this.fileInfo != null) {
// update has already been downloaded from this running instance
// check here only existence, not checksum
return isEqual(this.versionInfo, versionInfo) && isEqual(this.fileInfo, fileInfo) && (await pathExists(updateFile))
return isEqual(this.versionInfo, versionInfo) && isEqual(this.fileInfo.info, fileInfo.info) && (await pathExists(updateFile))
}

// update has already been downloaded from some previous app launch
Expand Down

0 comments on commit 3372008

Please sign in to comment.