mirror of
https://github.com/restic/restic.git
synced 2026-10-11 04:27:12 +00:00
check: replace cleanup handler
This commit is contained in:
1 parent
b15d867414
commit
21a7cb405c
1 file changed
+1
-4
@@ -199,10 +199,7 @@ func runCheck(ctx context.Context, opts CheckOptions, gopts GlobalOptions, args
|
||||
}
|
||||
|
||||
cleanup := prepareCheckCache(opts, &gopts)
|
||||
AddCleanupHandler(func(code int) (int, error) {
|
||||
cleanup()
|
||||
return code, nil
|
||||
})
|
||||
defer cleanup()
|
||||
|
||||
if !gopts.NoLock {
|
||||
Verbosef("create exclusive lock for repository\n")
|
||||
|
||||
Reference in new issue
Block a user