···1616// default. It can be replaced by the environment variable CHUNK_DIR.
1717const DefaultChunkDir = ".chunk"
18181919-// get the chunk directory under user's home directory
1919+// get the chunk directory under user's home directory or using the envvar
2020func getChunkProgressDir(dir string) (string, error) {
2121 if dir == "" {
2222 dir = os.Getenv("CHUNK_DIR")
···4646 Chunks []int64
4747}
48484949-// trues to loads a download progress from a file
4949+// it loads a download progress from a file if restart is set to false
5050func (p *progress) load(restart bool) error {
5151 p.lock.Lock()
5252 defer p.lock.Unlock()