Now it compiles

\!
This commit is contained in:
Hamcha 2016-02-20 21:59:41 +01:00
parent 23b847b94a
commit 0210dfe43e

View file

@ -101,8 +101,9 @@ func (t Telegram) GetFile(data tg.FileRequestData, client net.Conn, callback int
fail("Server didn't send a file info, does the file exist?") fail("Server didn't send a file info, does the file exist?")
return return
} }
result := *filespecs.Result
path := APIEndpoint + "file/bot" + t.Token + "/" + *(*(filespecs.Result).Path) path := APIEndpoint + "file/bot" + t.Token + "/" + *result.Path
fileresp, err := http.Get(path) fileresp, err := http.Get(path)
if checkerr("GetFile/get", err) { if checkerr("GetFile/get", err) {
fail("Could not retrieve file from Telegram's servers") fail("Could not retrieve file from Telegram's servers")
@ -117,9 +118,9 @@ func (t Telegram) GetFile(data tg.FileRequestData, client net.Conn, callback int
} }
rawlen := len(rawdata) rawlen := len(rawdata)
if rawlen != *filespecs.Size { if rawlen != *result.Size {
// ??? // ???
log.Printf("[GetFile] WARN ?? Downloaded file does not match provided filesize: %d != %d\n", rawlen, *filespecs.Size) log.Printf("[GetFile] WARN ?? Downloaded file does not match provided filesize: %d != %d\n", rawlen, *result.Size)
} }
b64data := base64.StdEncoding.EncodeToString(rawdata) b64data := base64.StdEncoding.EncodeToString(rawdata)