Tidy
This commit is contained in:
parent
b8da06a885
commit
ea0ccf6a23
|
@ -159,19 +159,17 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
|
defer close(done)
|
||||||
<-t.GotInfo()
|
<-t.GotInfo()
|
||||||
files := t.Files()
|
for _, file := range t.Files() {
|
||||||
for _, file := range files {
|
if file.DisplayPath() != rootGroup.Pick {
|
||||||
if file.Path() == rootGroup.Pick {
|
continue
|
||||||
|
|
||||||
log.Printf("Downloading file: %s", file.Path())
|
|
||||||
|
|
||||||
srcReader := io.NewSectionReader(t.NewReader(), file.Offset(), file.Length())
|
|
||||||
io.Copy(dstWriter, srcReader)
|
|
||||||
close(done)
|
|
||||||
break
|
|
||||||
}
|
}
|
||||||
|
srcReader := io.NewSectionReader(t.NewReader(), file.Offset(), file.Length())
|
||||||
|
io.Copy(dstWriter, srcReader)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
log.Print("file not found")
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue