add handling when source directory does not have slash suffix
This commit is contained in:
parent
70270a65f0
commit
fb4d1f9c8d
|
|
@ -59,12 +59,15 @@ func (c *CopyCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.Bu
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if fi.IsDir() && !strings.HasSuffix(fullPath, string(os.PathSeparator)) {
|
||||
fullPath += "/"
|
||||
}
|
||||
cwd := config.WorkingDir
|
||||
if cwd == "" {
|
||||
cwd = constants.RootDir
|
||||
}
|
||||
|
||||
destPath, err := util.DestinationFilepath(src, dest, cwd)
|
||||
destPath, err := util.DestinationFilepath(fullPath, dest, cwd)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue