Fixed compression error (#1097)
This commit is contained in:
parent
280ad4fcf9
commit
2fefee87fa
1 changed files with 3 additions and 1 deletions
|
@ -431,7 +431,9 @@ func AddFile(ar archiver.Writer, path, commonPath string) error {
|
|||
defer file.Close()
|
||||
|
||||
if path != commonPath {
|
||||
filename := info.Name()
|
||||
//filename := info.Name()
|
||||
filename := strings.TrimPrefix(path, commonPath)
|
||||
filename = strings.TrimPrefix(filename, string(filepath.Separator))
|
||||
err = ar.Write(archiver.File{
|
||||
FileInfo: archiver.FileInfo{
|
||||
FileInfo: info,
|
||||
|
|
Loading…
Reference in a new issue