Skip to content

Commit

Permalink
copy with full path instead of just base name of file or dir
Browse files Browse the repository at this point in the history
  • Loading branch information
sami-alajrami committed Jan 2, 2024
1 parent e4edc94 commit 8ed315a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/kosli/cli_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,10 @@ func getPathOfEvidenceFileToUpload(evidencePaths []string) (string, bool, error)
logger.Debug("[%d] paths are provided as evidence. They will be tarred from %s", len(evidencePaths), tmpDir)

for _, path := range evidencePaths {
err := cp.Copy(path, filepath.Join(tmpDir, filepath.Base(path)))
err := cp.Copy(path, filepath.Join(tmpDir, path), cp.Options{
PreserveTimes: true,
PreserveOwner: true,
})
if err != nil {
return "", cleanupNeeded, err
}
Expand Down

0 comments on commit 8ed315a

Please sign in to comment.