From 41752a0cf50735bc29dae18271539719f7b59f7c Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Tue, 17 Jan 2017 00:26:17 -0500 Subject: Convert Windows to Unix paths.. This means no filenames on unix with a '\' but I think we can live with that --- archive/archive.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'archive/archive.go') diff --git a/archive/archive.go b/archive/archive.go index 08b1c75..639a864 100644 --- a/archive/archive.go +++ b/archive/archive.go @@ -8,6 +8,8 @@ import ( "io" "os" + + "strings" ) type Archive struct { @@ -71,6 +73,9 @@ func tarWalkfn(writer *tar.Writer) filepath.WalkFunc { } defer f.Close() + // Convert Windows paths to Unix paths + path = strings.Replace(path, "\\", "/", -1) + // TODO; See if tar.FileInfoheader() could be used instead // without the pathing issues I encountered h := &tar.Header{ -- cgit v1.2.3