cmd/restic: Add lock handling, interrupt cleanup

This commit is contained in:
Alexander Neumann committed 2015-06-28 13:52:22 +02:00
1 parent 65a0def949
commit 13e9a35f96
11 files changed
+100 -22

No files matched your search

+2 -3
View File
@@ -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
}