From ab2338daadbb826063c1ff299a9e39bb41e40317 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Tue, 10 Jan 2017 12:44:56 -0500 Subject: Finding the ACF file now only returns the filename instead of the full path. When you package a game the ACF file is now included. --- steam/package.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'steam/package.go') diff --git a/steam/package.go b/steam/package.go index 690ac4a..72d29ee 100644 --- a/steam/package.go +++ b/steam/package.go @@ -1,8 +1,10 @@ package steam import ( + // "fmt" "git.riedstra.us/mitch/steam-export/archive" "os" + // "strings" ) func (l *Library) PackageGame(g string) error { @@ -12,8 +14,14 @@ func (l *Library) PackageGame(g string) error { } output := working_dir + "/" + g + ".tar" - os.Chdir(l.Folder + common) - input := g + os.Chdir(l.Folder) + acf, err := l.FindACF(g) + if err != nil { + return err + } + // acf = strings.Replace(acf, l.Folder, "", -1) + input := []string{"common/" + g, acf} + // fmt.Fprintf(os.Stderr, "input arguments for archive: %s\n", input) a := archive.Archive{Output: output, Input: input} err = a.Tar() if err != nil { -- cgit v1.2.3