diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2017-01-17 00:26:17 -0500 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2017-01-17 00:26:17 -0500 |
| commit | 41752a0cf50735bc29dae18271539719f7b59f7c (patch) | |
| tree | 545b0b9c50dfbbacb47138fde6ef9ba4c57b174c /archive | |
| parent | 9c1a057756c8f1ef486642699e45a9fa6df0b071 (diff) | |
| download | steam-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
Diffstat (limited to 'archive')
| -rw-r--r-- | archive/archive.go | 5 |
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{ |
