added preload estimate quote usage
This commit is contained in:
parent
0c1708e450
commit
088bd1f03e
5 changed files with 19 additions and 6 deletions
|
|
@ -33,7 +33,16 @@ func (q *queue) Add(ph *PreloadHandler, name string, prio int) {
|
|||
return
|
||||
}
|
||||
}
|
||||
*q = append(*q, &Preload{Name: name, ph: ph})
|
||||
p := &Preload{Name: name, ph: ph}
|
||||
*q = append(*q, p)
|
||||
file, err := ph.fs.Open(name)
|
||||
if err == nil {
|
||||
defer file.Close()
|
||||
f, ok := file.(*File)
|
||||
if ok {
|
||||
p.Size = f.size()
|
||||
}
|
||||
}
|
||||
q.Sort()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue