reduce scope a bit
This commit is contained in:
parent
f8eefd5c72
commit
49e2070b69
|
@ -161,11 +161,9 @@ func savedonk(url string, name, desc, media string, localize bool) *Donk {
|
||||||
if url == "" {
|
if url == "" {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
donk := finddonk(url)
|
if donk := finddonk(url); donk != nil {
|
||||||
if donk != nil {
|
|
||||||
return donk
|
return donk
|
||||||
}
|
}
|
||||||
donk = new(Donk)
|
|
||||||
log.Printf("saving donk: %s", url)
|
log.Printf("saving donk: %s", url)
|
||||||
xid := xfiltrate()
|
xid := xfiltrate()
|
||||||
data := []byte{}
|
data := []byte{}
|
||||||
|
@ -217,6 +215,7 @@ saveit:
|
||||||
log.Printf("error saving file %s: %s", url, err)
|
log.Printf("error saving file %s: %s", url, err)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
donk := new(Donk)
|
||||||
donk.FileID = fileid
|
donk.FileID = fileid
|
||||||
donk.XID = xid
|
donk.XID = xid
|
||||||
return donk
|
return donk
|
||||||
|
|
Loading…
Reference in New Issue