Skip to content

Commit

Permalink
Fix archive source file name
Browse files Browse the repository at this point in the history
  • Loading branch information
triole committed Aug 14, 2024
1 parent cf975fb commit 322a358
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/fileaxe/compression.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package fileaxe

import (
"context"
"fmt"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -52,7 +51,6 @@ func (fa FileAxe) compressFile(sourceFile FileInfo, target, compressionFormat st
Archival: archiver.Tar{},
}
}
fmt.Printf("%+v\n", format)
fa.Lg.Info(fa.Conf.MsgPrefix+"compress file", logseal.F{
"file": sourceFile.Path,
"size": sourceFile.SizeHR,
Expand Down Expand Up @@ -90,7 +88,7 @@ func (fa FileAxe) runCompression(sources []string, target string, format archive
var files []archiver.File
fileMap := make(map[string]string)
for _, fil := range sources {
fileMap[fil] = filepath.Base(target)
fileMap[fil] = filepath.Base(fil)
}

files, err = archiver.FilesFromDisk(nil, fileMap)
Expand Down

0 comments on commit 322a358

Please sign in to comment.