mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
Remove redundant if ...; err != nil; return pattern
This commit is contained in:
parent
6ed73ed408
commit
319087c056
@ -63,11 +63,7 @@ directories in an encrypted repository stored on different backends.
|
|||||||
|
|
||||||
// run the debug functions for all subcommands (if build tag "debug" is
|
// run the debug functions for all subcommands (if build tag "debug" is
|
||||||
// enabled)
|
// enabled)
|
||||||
if err := runDebug(); err != nil {
|
return runDebug()
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -306,10 +306,7 @@ func (be *b2Backend) List(ctx context.Context, t restic.FileType, fn func(restic
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err := iter.Err(); err != nil {
|
return iter.Err()
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete removes all restic keys in the bucket. It will not remove the bucket itself.
|
// Delete removes all restic keys in the bucket. It will not remove the bucket itself.
|
||||||
|
@ -605,11 +605,7 @@ func (node *Node) fillExtra(path string, fi os.FileInfo) error {
|
|||||||
return errors.Errorf("invalid node type %q", node.Type)
|
return errors.Errorf("invalid node type %q", node.Type)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := node.fillExtendedAttributes(path); err != nil {
|
return node.fillExtendedAttributes(path)
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (node *Node) fillExtendedAttributes(path string) error {
|
func (node *Node) fillExtendedAttributes(path string) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user