Make failed uploads not count as "Transferred" - fixes #708
This commit is contained in:
+6
-2
@@ -231,11 +231,15 @@ func (s *StatsInfo) Transferring(remote string) {
|
||||
}
|
||||
|
||||
// DoneTransferring removes a transfer from the stats
|
||||
func (s *StatsInfo) DoneTransferring(remote string) {
|
||||
//
|
||||
// if ok is true then it increments the transfers count
|
||||
func (s *StatsInfo) DoneTransferring(remote string, ok bool) {
|
||||
s.lock.Lock()
|
||||
defer s.lock.Unlock()
|
||||
delete(s.transferring, remote)
|
||||
s.transfers++
|
||||
if ok {
|
||||
s.transfers++
|
||||
}
|
||||
}
|
||||
|
||||
// Account limits and accounts for one transfer
|
||||
|
||||
Reference in New Issue
Block a user