mirror of
https://github.com/restic/restic.git
synced 2026-11-28 15:26:48 +00:00
cmd/restic: Add locks to commands
This commit is contained in:
1 parent
7d2699b429
commit
65a0def949
10 files changed
+62
No files matched your search
@@ -4,6 +4,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/restic/restic"
|
||||
"github.com/restic/restic/backend"
|
||||
)
|
||||
|
||||
@@ -35,6 +36,12 @@ func (cmd CmdList) Execute(args []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
lock, err := restic.NewLock(repo)
|
||||
defer lock.Unlock()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var t backend.Type
|
||||
switch args[0] {
|
||||
case "blobs":
|
||||
|
||||
Reference in new issue
Block a user