mirror of
https://github.com/restic/restic.git
synced 2026-06-17 22:24:17 +00:00
repository: deduplicate error handling in checkForOtherLocks
This commit is contained in:
@@ -185,11 +185,7 @@ func (l *lockHandle) checkForOtherLocks(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if l.Exclusive {
|
||||
return &alreadyLockedError{otherLock: lock}
|
||||
}
|
||||
|
||||
if !l.Exclusive && lock.Exclusive {
|
||||
if l.Exclusive || lock.Exclusive {
|
||||
return &alreadyLockedError{otherLock: lock}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user