[botanist] Fix archiving bug

Test results were being archived with the wrong names.

Change-Id: I64fdc0739b45e4c6e31e3065074a6cbfa3567e2f
diff --git a/botanist/fileutil.go b/botanist/fileutil.go
index 97d5112..97b3e6d 100644
--- a/botanist/fileutil.go
+++ b/botanist/fileutil.go
@@ -100,13 +100,13 @@
 
 // FetchAndArchiveFile fetches a remote file via TFTP from a given node, and
 // writes it an archive.
-func FetchAndArchiveFile(t *tftp.Client, addr *net.UDPAddr, tw *tar.Writer, path string) error {
+func FetchAndArchiveFile(t *tftp.Client, addr *net.UDPAddr, tw *tar.Writer, path, name string) error {
 	receiver, err := t.Receive(addr, path)
 	if err != nil {
 		return fmt.Errorf("failed to receive file %s: %v\n", path, err)
 	}
 	hdr := &tar.Header{
-		Name: filepath.Base(path),
+		Name: name,
 		Size: receiver.(tftp.Session).Size(),
 		Mode: 0666,
 	}
diff --git a/cmd/botanist/zedboot.go b/cmd/botanist/zedboot.go
index 6444ac3..eda0cbe 100644
--- a/cmd/botanist/zedboot.go
+++ b/cmd/botanist/zedboot.go
@@ -317,14 +317,14 @@
 		// Copy test output from the node.
 		for _, output := range result.Outputs {
 			remote := filepath.Join(cmd.testResultsDir, output)
-			if err = botanist.FetchAndArchiveFile(t, tftpAddr, tw, remote); err != nil {
+			if err = botanist.FetchAndArchiveFile(t, tftpAddr, tw, remote, output); err != nil {
 				c <- err
 				return
 			}
 		}
 		for _, test := range result.Tests {
 			remote := filepath.Join(cmd.testResultsDir, test.OutputFile)
-			if err = botanist.FetchAndArchiveFile(t, tftpAddr, tw, remote); err != nil {
+			if err = botanist.FetchAndArchiveFile(t, tftpAddr, tw, remote, test.OutputFile); err != nil {
 				c <- err
 				return
 			}
@@ -332,7 +332,7 @@
 			for _, sinks := range test.DataSinks {
 				for _, sink := range sinks {
 					remote := filepath.Join(cmd.testResultsDir, sink.File)
-					if err = botanist.FetchAndArchiveFile(t, tftpAddr, tw, remote); err != nil {
+					if err = botanist.FetchAndArchiveFile(t, tftpAddr, tw, remote, sink.File); err != nil {
 						c <- err
 						return
 					}