Skip to content

Commit

Permalink
Замена сравненией вызовами compareFileHash
Browse files Browse the repository at this point in the history
  • Loading branch information
JoCat committed Jan 6, 2025
1 parent 6ca6599 commit e19cb7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions packages/core/src/helpers/HttpHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,14 @@ export class HttpHelper {
private static async verifyFileHash(file: File) {
if (!file.sha1) return false

let currentHash
try {
currentHash = await HashHelper.getHashFromFile(
return await HashHelper.compareFileHash(
file.destinationPath,
"sha1",
file.sha1,
)
} catch {
return false
}

return file.sha1 === currentHash
}
}

0 comments on commit e19cb7c

Please sign in to comment.