diff --git a/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/user_services_functions/copy_files_from_user_service.go b/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/user_services_functions/copy_files_from_user_service.go index 1e5fa4ac7e..538bc62511 100644 --- a/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/user_services_functions/copy_files_from_user_service.go +++ b/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/user_services_functions/copy_files_from_user_service.go @@ -26,7 +26,6 @@ func CopyFilesFromUserService( output io.Writer, dockerManager *docker_manager.DockerManager, ) error { - srcPath := srcPathOnContainer srcPathBase := filepath.Base(srcPathOnContainer) if srcPathBase == doNotIncludeParentDirInArchiveSymbol { @@ -54,10 +53,11 @@ func CopyFilesFromUserService( } defer tarStreamReadCloser.Close() - if _, err := io.Copy(output, tarStreamReadCloser); err != nil { + if numBytesCopied, err := io.Copy(output, tarStreamReadCloser); err != nil { return stacktrace.Propagate( err, - "An error occurred copying the bytes of TAR'd up files at '%v' on service '%v' to the output", + "'%v' bytes copied before an error occurred copying the bytes of TAR'd up files at '%v' on service '%v' to the output", + numBytesCopied, srcPathOnContainer, serviceUuid, ) diff --git a/container-engine-lib/lib/backend_impls/docker/docker_manager/docker_manager.go b/container-engine-lib/lib/backend_impls/docker/docker_manager/docker_manager.go index bd4e771c04..b76e691028 100644 --- a/container-engine-lib/lib/backend_impls/docker/docker_manager/docker_manager.go +++ b/container-engine-lib/lib/backend_impls/docker/docker_manager/docker_manager.go @@ -1553,7 +1553,7 @@ func (manager *DockerManager) CopyFromContainer(ctx context.Context, containerId } } - tarStreamReadCloser, _, err := manager.dockerClient.CopyFromContainer( + tarStreamReadCloser, _, err := manager.dockerClientNoTimeout.CopyFromContainer( ctx, containerId, srcPath)