mirror of
https://github.com/restic/restic.git
synced 2026-10-31 20:45:42 +00:00
repository: deduplicate error handling in checkForOtherLocks
This commit is contained in:
1 parent
b7f3a1367a
commit
5989671f87
1 file changed
+1
-5
@@ -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