Merge pull request #1145 from harshavardhana/fix-segfault
Fix a segfault in mc for progress bar theme init
This commit is contained in:
@@ -314,7 +314,6 @@ func mainCopy(ctx *cli.Context) {
|
||||
|
||||
console.SetCustomTheme(map[string]*color.Color{
|
||||
"Copy": color.New(color.FgGreen, color.Bold),
|
||||
"Bar": color.New(color.FgGreen, color.Bold),
|
||||
})
|
||||
|
||||
session := newSessionV2()
|
||||
|
||||
@@ -314,7 +314,6 @@ func mainMirror(ctx *cli.Context) {
|
||||
|
||||
console.SetCustomTheme(map[string]*color.Color{
|
||||
"Mirror": color.New(color.FgGreen, color.Bold),
|
||||
"Bar": color.New(color.FgGreen, color.Bold),
|
||||
})
|
||||
|
||||
var e error
|
||||
|
||||
@@ -25,6 +25,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/dustin/go-humanize"
|
||||
"github.com/fatih/color"
|
||||
"github.com/minio/minio/pkg/probe"
|
||||
"github.com/minio/pb"
|
||||
"github.com/olekukonko/ts"
|
||||
@@ -147,6 +148,9 @@ func getFixedWidth(width, percent int) int {
|
||||
|
||||
// newProgressBar - instantiate a pbBar.
|
||||
func newProgressBar() barSend {
|
||||
console.SetCustomTheme(map[string]*color.Color{
|
||||
"Bar": color.New(color.FgGreen, color.Bold),
|
||||
})
|
||||
cmdCh := make(chan barMsg)
|
||||
finishCh := make(chan bool)
|
||||
go func(cmdCh <-chan barMsg, finishCh chan<- bool) {
|
||||
|
||||
Reference in New Issue
Block a user