Skip to content

Commit

Permalink
fix(electron-updater): Replace all occurrences of version in old bloc…
Browse files Browse the repository at this point in the history
…kmap file url (#3120)
  • Loading branch information
akshitkrnagpal authored and develar committed Jul 16, 2018
1 parent bc6a3a0 commit ca18b74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/electron-updater/src/NsisUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export class NsisUpdater extends BaseUpdater {
private async differentialDownloadInstaller(fileInfo: ResolvedUpdateFileInfo, downloadUpdateOptions: DownloadUpdateOptions, installerPath: string, requestHeaders: OutgoingHttpHeaders, provider: Provider<any>) {
try {
const newBlockMapUrl = newUrlFromBase(`${fileInfo.url.pathname}.blockmap`, fileInfo.url)
const oldBlockMapUrl = newUrlFromBase(`${fileInfo.url.pathname.replace(downloadUpdateOptions.updateInfo.version, this.currentVersion.version)}.blockmap`, fileInfo.url)
const oldBlockMapUrl = newUrlFromBase(`${fileInfo.url.pathname.replace(new RegExp(downloadUpdateOptions.updateInfo.version, "g"), this.currentVersion.version)}.blockmap`, fileInfo.url)
this._logger.info(`Download block maps (old: "${oldBlockMapUrl.href}", new: ${newBlockMapUrl.href})`)

const downloadBlockMap = async (url: URL): Promise<BlockMap> => {
Expand Down

0 comments on commit ca18b74

Please sign in to comment.