Skip to content

Commit

Permalink
Merge pull request #4828 from giuseppe/drop-pause-check
Browse files Browse the repository at this point in the history
cp: drop check for rootless
  • Loading branch information
openshift-merge-robot authored Jan 10, 2020
2 parents f57fdd0 + 751c403 commit 8acc1dc
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions cmd/podman/cp.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,7 @@ func copyBetweenHostAndContainer(runtime *libpod.Runtime, src string, dest strin
}
}()

// We can't pause rootless containers.
if pause && rootless.IsRootless() {
state, err := ctr.State()
if err != nil {
return err
}
if state == define.ContainerStateRunning {
return errors.Errorf("cannot copy into running rootless container with pause set - pass --pause=false to force copying")
}
}

if pause && !rootless.IsRootless() {
if pause {
if err := ctr.Pause(); err != nil {
// An invalid state error is fine.
// The container isn't running or is already paused.
Expand Down

0 comments on commit 8acc1dc

Please sign in to comment.