"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
cmd: shorten the locking window when using --progress to avoid deadlock
Nick Craig-Woodfdef567da603
diff --git a/cmd/progress.go b/cmd/progress.goindex 0ea44501a..8c09cee89 100644--- a/cmd/progress.go+++ b/cmd/progress.go@@ -84,9 +84,6 @@ var (// printProgress prints the progress with an optional logfunc printProgress(logMessage string) {- progressMu.Lock()- defer progressMu.Unlock()-var buf bytes.Bufferw, h, err := terminal.GetSize(int(os.Stdout.Fd()))if err != nil {@@ -100,6 +97,10 @@ func printProgress(logMessage string) {buf.WriteString(s)}+ // Lock from here to prevent terminal corruption+ progressMu.Lock()+ progressMu.Unlock()+if logMessage != "" {out("\n")out(moveUp)