mirror of https://github.com/rclone/rclone.git
Revert "cmd: shorten the locking window when using --progress to avoid deadlock"
This reverts commit fdef567da6
.
The problem turned out to be elsewhere.
This commit is contained in:
parent
99b3154abd
commit
9d1fb2f4e7
|
@ -84,6 +84,9 @@ var (
|
|||
|
||||
// printProgress prints the progress with an optional log
|
||||
func printProgress(logMessage string) {
|
||||
progressMu.Lock()
|
||||
defer progressMu.Unlock()
|
||||
|
||||
var buf bytes.Buffer
|
||||
w, h, err := terminal.GetSize(int(os.Stdout.Fd()))
|
||||
if err != nil {
|
||||
|
@ -97,10 +100,6 @@ func printProgress(logMessage string) {
|
|||
buf.WriteString(s)
|
||||
}
|
||||
|
||||
// Lock from here to prevent terminal corruption
|
||||
progressMu.Lock()
|
||||
progressMu.Unlock()
|
||||
|
||||
if logMessage != "" {
|
||||
out("\n")
|
||||
out(moveUp)
|
||||
|
|
Loading…
Reference in New Issue