mirror of
https://github.com/restic/restic.git
synced 2026-05-02 09:05:23 +00:00
list: Never lock the repository when listing lock files
There's no point in locking the repository just to list the currently existing lock files. This won't work for an exclusively locked repository and is also confusing to users.
This commit is contained in:
@@ -39,7 +39,7 @@ func runList(cmd *cobra.Command, opts GlobalOptions, args []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if !opts.NoLock {
|
||||
if !opts.NoLock && args[0] != "locks" {
|
||||
lock, err := lockRepo(opts.ctx, repo)
|
||||
defer unlockRepo(lock)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user