clean up
This commit is contained in:
parent
66f4191c5f
commit
44d20eb983
10 changed files with 319 additions and 72 deletions
|
@ -108,7 +108,11 @@ func decompressTarGz(srcFile, destDir string, updateProgress func(int, string))
|
|||
// Update progress after extracting each file.
|
||||
if updateProgress != nil {
|
||||
percent := int((progressReader.BytesRead * 100) / totalSize)
|
||||
updateProgress(percent, fmt.Sprintf("Extracted: %s", header.Name))
|
||||
name := header.Name
|
||||
if len(name) > 50 {
|
||||
name = name[len(name)-50:]
|
||||
}
|
||||
updateProgress(percent, fmt.Sprintf("Extracted: %s", name))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue