Skip to content

Commit

Permalink
Return archiveList in more places. (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnewhall authored Jul 9, 2024
1 parent 788bbcf commit 53cf1d6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ type Response struct {
// Elapsed extraction duration. ie. How long it took.
Elapsed time.Duration
// Extra archives extracted from within an archive.
Extras map[string][]string
Extras ArchiveList
// Initial archives found and extracted.
Archives map[string][]string
Archives ArchiveList
// Files written to final path.
NewFiles []string
// Error encountered, only when done=true.
Expand Down Expand Up @@ -131,8 +131,8 @@ func (x *Xtractr) extract(ext *Xtract) {
X: ext,
Started: resp.Started,
Output: resp.Output,
Archives: make(map[string][]string),
Extras: make(map[string][]string),
Archives: make(ArchiveList),
Extras: make(ArchiveList),
}

for k, v := range resp.Archives {
Expand All @@ -147,7 +147,7 @@ func (x *Xtractr) extract(ext *Xtract) {
// or the extracted files may be copied back to where they were extracted from.
// If the extracted data is not being coppied back, then the tempDir (output) paths match the input paths.
func (x *Xtractr) decompressFolders(resp *Response) error {
allArchives := make(map[string][]string)
allArchives := make(ArchiveList)

for subDir := range resp.Archives {
output := resp.Output
Expand All @@ -172,7 +172,7 @@ func (x *Xtractr) decompressFolders(resp *Response) error {
},
Started: resp.Started,
Output: output,
Archives: map[string][]string{subDir: resp.Archives[subDir]},
Archives: ArchiveList{subDir: resp.Archives[subDir]},
}

err := x.decompressFiles(subResp)
Expand Down

0 comments on commit 53cf1d6

Please sign in to comment.