diff --git a/internal/restic/lock_windows.go b/internal/restic/lock_windows.go index f38840f9f..60ded23d0 100644 --- a/internal/restic/lock_windows.go +++ b/internal/restic/lock_windows.go @@ -14,12 +14,15 @@ func uidGidInt(_ *user.User) (uid, gid uint32, err error) { // checkProcess will check if the process retaining the lock exists. // Returns true if the process exists. -func (l Lock) processExists() bool { +func (l *Lock) processExists() bool { proc, err := os.FindProcess(l.PID) if err != nil { debug.Log("error searching for process %d: %v\n", l.PID, err) return false } - proc.Release() + err = proc.Release() + if err != nil { + debug.Log("error releasing process %d: %v\n", l.PID, err) + } return true }