mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 07:40:56 +08:00 
			
		
		
		
	修复存储空间统计可能为负值的问题
This commit is contained in:
		@@ -177,10 +177,15 @@ func (this *Manager) TotalDiskSize() int64 {
 | 
			
		||||
	this.locker.RLock()
 | 
			
		||||
	defer this.locker.RUnlock()
 | 
			
		||||
 | 
			
		||||
	total := int64(0)
 | 
			
		||||
	var total = int64(0)
 | 
			
		||||
	for _, storage := range this.storageMap {
 | 
			
		||||
		total += storage.TotalDiskSize()
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if total < 0 {
 | 
			
		||||
		total = 0
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return total
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user