Skip to content

Commit 2c9de85

Browse files
committed
fix: revert stable update file name
Further revert
1 parent bf43a06 commit 2c9de85

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

.changeset/wicked-zebras-begin.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
---
44

55
Fixed missing lowercase in extension comparison.
6-
Fixed invalid file path generated for update file.

packages/electron-updater/src/AppUpdater.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
BlockMap,
1313
retry,
1414
} from "builder-util-runtime"
15-
import { randomBytes, createHash } from "crypto"
15+
import { randomBytes } from "crypto"
1616
import { release } from "os"
1717
import { EventEmitter } from "events"
1818
import { mkdir, outputFile, readFile, rename, unlink } from "fs-extra"
@@ -701,10 +701,8 @@ export abstract class AppUpdater extends (EventEmitter as new () => TypedEmitter
701701
if (urlPath.toLowerCase().endsWith(`.${taskOptions.fileExtension.toLowerCase()}`)) {
702702
return path.basename(urlPath)
703703
} else {
704-
// url like /latest, generate stable name
705-
const hash = createHash("sha1")
706-
hash.update(taskOptions.fileInfo.url.toString())
707-
return hash.digest("hex")
704+
// url like /latest, generate name
705+
return taskOptions.fileInfo.info.url
708706
}
709707
}
710708

0 commit comments

Comments
 (0)