summaryrefslogtreecommitdiff
path: root/cmd/podman/cp.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-07-22 13:13:50 +0200
committerGitHub <noreply@github.com>2019-07-22 13:13:50 +0200
commit3b52e4d0b5baacf5f63516c664a117a7537a075e (patch)
treeef6dc8150136e7941daf45a2e6b615dee43c7893 /cmd/podman/cp.go
parentd6b41eb393c154eaff79b4fdcb04c7510a6fdb20 (diff)
parentdb826d5d75630cca784bd7092eba5b06601ae27f (diff)
downloadpodman-3b52e4d0b5baacf5f63516c664a117a7537a075e.tar.gz
podman-3b52e4d0b5baacf5f63516c664a117a7537a075e.tar.bz2
podman-3b52e4d0b5baacf5f63516c664a117a7537a075e.zip
Merge pull request #3562 from baude/golangcilint3
golangci-lint round #3
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) {