cmd/restic: Add locks to commands

This commit is contained in:
Alexander Neumann committed 2015-06-28 13:52:22 +02:00
1 parent 7d2699b429
commit 65a0def949
10 files changed
+62

No files matched your search

+7
View File
@@ -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":