mirror of
https://github.com/restic/restic.git
synced 2026-11-28 15:26:48 +00:00
cmd/restic: Add lock handling, interrupt cleanup
This commit is contained in:
1 parent
65a0def949
commit
13e9a35f96
11 files changed
+100
-22
No files matched your search
@@ -4,7 +4,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/restic/restic"
|
||||
"github.com/restic/restic/backend"
|
||||
)
|
||||
|
||||
@@ -36,8 +35,8 @@ func (cmd CmdList) Execute(args []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
lock, err := restic.NewLock(repo)
|
||||
defer lock.Unlock()
|
||||
lock, err := lockRepo(repo)
|
||||
defer unlockRepo(lock)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user