diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2017-01-16 21:08:10 -0500 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2017-01-16 21:08:10 -0500 |
| commit | 26fdb68fbb1fadf8a917bdf5734af05d93bda2a0 (patch) | |
| tree | c89c59ab107d2f5c1f40eecebb84d12afbf430f1 /steam/package.go | |
| parent | d4237470e32ce36dd7e0ea88cc274ec5311d69cc (diff) | |
| download | steam-export-26fdb68fbb1fadf8a917bdf5734af05d93bda2a0.tar.gz steam-export-26fdb68fbb1fadf8a917bdf5734af05d93bda2a0.tar.xz | |
Add support for gzipped archives
Diffstat (limited to 'steam/package.go')
| -rw-r--r-- | steam/package.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/steam/package.go b/steam/package.go index d7e33af..efa2f24 100644 --- a/steam/package.go +++ b/steam/package.go @@ -7,7 +7,7 @@ import ( "path/filepath" ) -func (l *Library) PackageGameToFile(index int, file string) error { +func (l *Library) PackageGameToFile(index int, file, compress string) error { g := l.Games[index] working_dir, err := os.Getwd() @@ -27,7 +27,7 @@ func (l *Library) PackageGameToFile(index int, file string) error { } input := []string{"common/" + g, acf} a := archive.Archive{Output: output, Input: input} - err = a.Tar() + err = a.Tar(compress) if err != nil { return err } @@ -37,7 +37,7 @@ func (l *Library) PackageGameToFile(index int, file string) error { return nil } -func (l *Library) ExtractGameFromFile(f string) error { +func (l *Library) ExtractGameFromFile(f, compress string) error { working_dir, err := os.Getwd() if err != nil { return err @@ -54,7 +54,7 @@ func (l *Library) ExtractGameFromFile(f string) error { u := &archive.Unarchive{ Input: f, } - if err := u.UnTar(); err != nil { + if err := u.UnTar(compress); err != nil { return err } |
