mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
vendor updates
This commit is contained in:
10
vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cp.go
generated
vendored
10
vendor/k8s.io/kubernetes/pkg/kubectl/cmd/cp.go
generated
vendored
@ -64,7 +64,8 @@ var (
|
||||
// NewCmdCp creates a new Copy command.
|
||||
func NewCmdCp(f cmdutil.Factory, cmdOut, cmdErr io.Writer) *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "cp <file-spec-src> <file-spec-dest>",
|
||||
Use: "cp <file-spec-src> <file-spec-dest>",
|
||||
DisableFlagsInUseLine: true,
|
||||
Short: i18n.T("Copy files and directories to and from containers."),
|
||||
Long: "Copy files and directories to and from containers.",
|
||||
Example: cpExample,
|
||||
@ -378,11 +379,8 @@ func untarAll(reader io.Reader, destFile, prefix string) error {
|
||||
}
|
||||
|
||||
func getPrefix(file string) string {
|
||||
if file[0] == '/' {
|
||||
// tar strips the leading '/' if it's there, so we will too
|
||||
return file[1:]
|
||||
}
|
||||
return file
|
||||
// tar strips the leading '/' if it's there, so we will too
|
||||
return strings.TrimLeft(file, "/")
|
||||
}
|
||||
|
||||
func execute(f cmdutil.Factory, cmd *cobra.Command, options *ExecOptions) error {
|
||||
|
Reference in New Issue
Block a user