Skip to content

Commit

Permalink
test and release
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnywong committed Jul 17, 2022
1 parent eab21b8 commit e874532
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
trzsz (0.1.9) trusty; urgency=medium

* trzsz-go v0.1.9

-- Lonny Wong <lonnywong@qq.com> Sun, 17 Jul 2022 08:16:25 +0800

trzsz (0.1.8) trusty; urgency=medium

* Release v0.1.8 with Go1.18.
Expand Down
8 changes: 8 additions & 0 deletions trzsz/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,14 @@ func (p *TextProgressBar) onStep(step int64) {
}

func (p *TextProgressBar) onDone() {
if !p.firstWrite {
if p.tmuxPaneColumns > 0 {
p.writer.Write([]byte(fmt.Sprintf("\x1b[%dD", p.columns)))
} else {
p.writer.Write([]byte("\r"))
}
p.firstWrite = true
}
}

func (p *TextProgressBar) showProgress() {
Expand Down
4 changes: 1 addition & 3 deletions trzsz/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ func (t *TrzszTransfer) stopTransferringFiles() {
func (t *TrzszTransfer) cleanInput(timeoutDuration time.Duration) {
t.stopped = true
t.buffer.drainBuffer()
if atomic.LoadInt64(&t.lastInputTime) == 0 {
return
}
atomic.StoreInt64(&t.lastInputTime, time.Now().UnixMilli())
for {
sleepDuration := timeoutDuration - time.Now().Sub(time.UnixMilli(atomic.LoadInt64(&t.lastInputTime)))
if sleepDuration <= 0 {
Expand Down
2 changes: 1 addition & 1 deletion trzsz/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ SOFTWARE.

package trzsz

const kTrzszVersion = "0.1.8"
const kTrzszVersion = "0.1.9"

0 comments on commit e874532

Please sign in to comment.