aboutsummaryrefslogtreecommitdiff
path: root/steam/package.go
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2017-01-10 12:44:56 -0500
committerMitch Riedstra <mitch@riedstra.us>2017-01-10 12:44:56 -0500
commitab2338daadbb826063c1ff299a9e39bb41e40317 (patch)
treef992b36f0cd64199b48687d91c19fe5b5af2777f /steam/package.go
parent859b67383410b279707d86604dfdbfe9de893ca9 (diff)
downloadsteam-export-ab2338daadbb826063c1ff299a9e39bb41e40317.tar.gz
steam-export-ab2338daadbb826063c1ff299a9e39bb41e40317.tar.xz
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.
Diffstat (limited to 'steam/package.go')
-rw-r--r--steam/package.go12
1 files changed, 10 insertions, 2 deletions
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 {