Skip to content

Commit

Permalink
Fix condition
Browse files Browse the repository at this point in the history
  • Loading branch information
m90 committed Feb 15, 2024
1 parent af5c0cc commit 7403415
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/backup/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func runScript(c *Config) (err error) {
}
defer func() {
derr := unlock()
if err != nil {
if err == nil && derr != nil {
err = fmt.Errorf("runScript: error releasing file lock: %w", derr)
}
}()
Expand Down

0 comments on commit 7403415

Please sign in to comment.