From 26fdb68fbb1fadf8a917bdf5734af05d93bda2a0 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Mon, 16 Jan 2017 21:08:10 -0500 Subject: Add support for gzipped archives --- steam/package.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'steam') 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 } -- cgit v1.2.3