@@ -20,11 +20,11 @@ const (
2020// Either may produce multiple xtractr.XFile structs (extractable archives).
2121type ExtractProgress struct {
2222 * xtractr.Progress
23- // Extract extract that exists in the map.
23+ // Extract that exists in the map.
2424 * Extract
25- // Number of archives in this Xtract .
25+ // Number of archives in this Extract .
2626 Archives int
27- // Number of archives extracted from this Xtract .
27+ // Number of archives extracted from this Extract .
2828 Extracted int
2929}
3030
@@ -52,15 +52,15 @@ func (u *Unpackerr) progressUpdateCallback(item *Extract) func(xtractr.Progress)
5252 }
5353}
5454
55- // prog = what just came in, it's ephemeral.
56- // prog.XProg = what is saved in the map, update this one .
57- // prog.Progress = also what just came in, we just set it here .
58- func (u * Unpackerr ) handleProgress (prog * ExtractProgress ) {
59- if prog .XProg .Progress != nil && prog .XProg .XFile != prog .XFile {
60- prog .XProg .Extracted ++
55+ // exp = what just came in, it's ephemeral.
56+ // exp.Progress = also what just came in, must set it here .
57+ // exp.XProg = what is saved in the map, update this one .
58+ func (u * Unpackerr ) handleProgress (exp * ExtractProgress ) {
59+ if exp .XProg .Progress != nil && exp .XProg .XFile != exp .XFile {
60+ exp .XProg .Extracted ++
6161 }
6262
63- prog .XProg .Progress = prog .Progress
63+ exp .XProg .Progress = exp .Progress
6464}
6565
6666func (u * Unpackerr ) printProgress (now time.Time ) {
0 commit comments