diff options
Diffstat (limited to 'steam/extract.go')
| -rw-r--r-- | steam/extract.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/steam/extract.go b/steam/extract.go index 45a760b..4f340fe 100644 --- a/steam/extract.go +++ b/steam/extract.go @@ -2,7 +2,6 @@ package steam import ( "archive/tar" - "errors" "fmt" "io" "net/url" @@ -20,11 +19,11 @@ const updateEveryNBytes = 10 * 1024 * 1024 // 10mb // // For example the following forms are accepted: // -// ExtractSmart("http://127.0.0.1/some-archive") -// ExtractSmart("https://example.com/some-archive") -// ExtractSmart("file:///some/local/file/path/to/archive.tar") -// ExtractSmart("/direct/path/to/archive.tar") -// ExtractSmart("C:\Users\user\Downloads\archive.tar") +// ExtractSmart("http://127.0.0.1/some-archive") +// ExtractSmart("https://example.com/some-archive") +// ExtractSmart("file:///some/local/file/path/to/archive.tar") +// ExtractSmart("/direct/path/to/archive.tar") +// ExtractSmart("C:\Users\user\Downloads\archive.tar") func (l *Library) ExtractSmart(uri string) (*Game, error) { if strings.HasPrefix(uri, "http") { _, err := url.Parse(uri) @@ -45,7 +44,7 @@ func (l *Library) ExtractSmart(uri string) (*Game, error) { // ExtractFile is a wrapper around Extract that handles local files. this // spawns an "extractFile" on the library. Status will be updated there as this -// goes along. Non fatal and fatal errors will be populated there +// goes along. Non-fatal and fatal errors will be populated there func (l *Library) ExtractFile(fn string) (*Game, error) { g := &Game{} j := newJob("extractFile", g) @@ -125,7 +124,7 @@ func (l *Library) extractUpdate(j *Job, g *Game, rdr io.Reader) (*Game, error) { estSize := j.GetSize() if estSize == nil { - j.addError(errors.New("Expected an estimated size, got nil")) + j.addError(E_NoEstimatedSize) continue } |
