fix github

see 2a4b92075e
This commit is contained in:
Matthias Kadenbach 2017-02-19 15:31:57 -08:00
parent 53b55288b3
commit 4bb46a98c6
No known key found for this signature in database
GPG Key ID: DC1F4DC6D31A7031
1 changed files with 4 additions and 4 deletions

View File

@ -151,11 +151,11 @@ func (g *Github) ReadUp(version uint) (r io.ReadCloser, identifier string, err e
return nil, "", err
}
if file != nil {
r, err := file.Decode()
r, err := file.GetContent()
if err != nil {
return nil, "", err
}
return ioutil.NopCloser(bytes.NewReader(r)), m.Identifier, nil
return ioutil.NopCloser(bytes.NewReader([]byte(r))), m.Identifier, nil
}
}
return nil, "", &os.PathError{fmt.Sprintf("read version %v", version), g.path, os.ErrNotExist}
@ -168,11 +168,11 @@ func (g *Github) ReadDown(version uint) (r io.ReadCloser, identifier string, err
return nil, "", err
}
if file != nil {
r, err := file.Decode()
r, err := file.GetContent()
if err != nil {
return nil, "", err
}
return ioutil.NopCloser(bytes.NewReader(r)), m.Identifier, nil
return ioutil.NopCloser(bytes.NewReader([]byte(r))), m.Identifier, nil
}
}
return nil, "", &os.PathError{fmt.Sprintf("read version %v", version), g.path, os.ErrNotExist}