summaryrefslogtreecommitdiff
path: root/cmd/podman/cp.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-07-11 05:44:12 -0500
committerbaude <bbaude@redhat.com>2019-07-21 14:22:39 -0500
commitdb826d5d75630cca784bd7092eba5b06601ae27f (patch)
treec60cc844e499d5d57752fdb92d4036ea0487ae3c /cmd/podman/cp.go
parenta5aa44c583612e210cf2ba44c3313a2ff27c94da (diff)
downloadpodman-db826d5d75630cca784bd7092eba5b06601ae27f.tar.gz
podman-db826d5d75630cca784bd7092eba5b06601ae27f.tar.bz2
podman-db826d5d75630cca784bd7092eba5b06601ae27f.zip
golangci-lint round #3
this is the third round of preparing to use the golangci-lint on our code base. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/cp.go')
-rw-r--r--cmd/podman/cp.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/cmd/podman/cp.go b/cmd/podman/cp.go
index 7c28edd26..bee7d2199 100644
--- a/cmd/podman/cp.go
+++ b/cmd/podman/cp.go
@@ -122,7 +122,7 @@ func copyBetweenHostAndContainer(runtime *libpod.Runtime, src string, dest strin
if errors.Cause(err) != define.ErrCtrStateInvalid {
return err
}
- } else if err == nil {
+ } else {
// Only add the defer if we actually paused
defer func() {
if err := ctr.Unpause(); err != nil {
@@ -486,10 +486,7 @@ func matchVolumePath(path, target string) bool {
for len(pathStr) > len(target) && strings.Contains(pathStr, string(os.PathSeparator)) {
pathStr = pathStr[:strings.LastIndex(pathStr, string(os.PathSeparator))]
}
- if pathStr == target {
- return true
- }
- return false
+ return pathStr == target
}
func pathWithBindMountSource(m specs.Mount, path string) (string, error) {