This commit is contained in:
partisan 2025-03-01 17:59:26 +01:00
parent 66f4191c5f
commit 44d20eb983
10 changed files with 319 additions and 72 deletions

View file

@ -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))
}
}