aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2017-01-17 00:26:17 -0500
committerMitch Riedstra <mitch@riedstra.us>2017-01-17 00:26:17 -0500
commit41752a0cf50735bc29dae18271539719f7b59f7c (patch)
tree545b0b9c50dfbbacb47138fde6ef9ba4c57b174c
parent9c1a057756c8f1ef486642699e45a9fa6df0b071 (diff)
downloadsteam-export-41752a0cf50735bc29dae18271539719f7b59f7c.tar.gz
steam-export-41752a0cf50735bc29dae18271539719f7b59f7c.tar.xz
Convert Windows to Unix paths.. This means no filenames on unix with a '\' but I think we can live with that
-rw-r--r--archive/archive.go5
1 files changed, 5 insertions, 0 deletions
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{