Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions pkg/oc/cli/admin/release/extract_tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,15 +361,15 @@ func (o *ExtractOptions) extractCommand(command string) error {
klog.V(2).Infof("Unable to set extracted file modification time: %v", err)
}

// calculate hashes
if hash != nil {
func() {
extractLock.Lock()
defer extractLock.Unlock()
// calculate hashes and mark target as processed
func() {
extractLock.Lock()
defer extractLock.Unlock()
if hash != nil {
hashByTargetName[layer.Mapping.To] = hex.EncodeToString(hash.Sum(nil))
delete(targetsByName, layer.Mapping.Name)
}()
}
}
delete(targetsByName, layer.Mapping.Name)
}()

return false, nil
}
Expand Down