@@ -22,16 +22,15 @@ import (
22
22
)
23
23
24
24
func createArchive (files []string , inputFilePath , outputFilePath string , compression string , compressionConcurrency int ) error {
25
- inputFilePath = stripTrailingSlashes (inputFilePath )
26
- inputFilePath , outputFilePath , err := makeAbsolute (inputFilePath , outputFilePath )
25
+ _ , outputFilePath , err := makeAbsolute (stripTrailingSlashes (inputFilePath ), outputFilePath )
27
26
if err != nil {
28
27
return errwrap .Wrap (err , "error transposing given file paths" )
29
28
}
30
29
if err := os .MkdirAll (filepath .Dir (outputFilePath ), 0755 ); err != nil {
31
30
return errwrap .Wrap (err , "error creating output file path" )
32
31
}
33
32
34
- if err := compress (files , outputFilePath , filepath . Dir ( inputFilePath ), compression , compressionConcurrency ); err != nil {
33
+ if err := compress (files , outputFilePath , compression , compressionConcurrency ); err != nil {
35
34
return errwrap .Wrap (err , "error creating archive" )
36
35
}
37
36
@@ -55,7 +54,7 @@ func makeAbsolute(inputFilePath, outputFilePath string) (string, string, error)
55
54
return inputFilePath , outputFilePath , err
56
55
}
57
56
58
- func compress (paths []string , outFilePath , subPath string , algo string , concurrency int ) error {
57
+ func compress (paths []string , outFilePath , algo string , concurrency int ) error {
59
58
file , err := os .Create (outFilePath )
60
59
if err != nil {
61
60
return errwrap .Wrap (err , "error creating out file" )
0 commit comments