Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pull/393'
Browse files Browse the repository at this point in the history
* origin/pull/393:
  Fix input/output file comparison when signing
  • Loading branch information
Foxboron committed Oct 28, 2024
2 parents 904df3c + 52ca4a5 commit da388a1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,7 @@ func SignFile(state *config.State, kh *backend.KeyHierarchy, ev hierarchy.Hierar

// Check if the files are identical
if file != output {
if _, err := state.Fs.Stat(output); errors.Is(err, os.ErrExist) {
outputFile, err := state.Fs.Open(output)
if err != nil {
return err
}
if outputFile, err := state.Fs.Open(output); err == nil {
defer outputFile.Close()
outputBinary, err := authenticode.Parse(outputFile)
if err != nil {
Expand Down

0 comments on commit da388a1

Please sign in to comment.