mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Fixed calculating the disk use percentage if there's more than 20TB of recordings
This commit is contained in:
		| @@ -3674,3 +3674,7 @@ Jens Schleusener <Jens.Schleusener@fossies.org> | ||||
|  | ||||
| Bernd Kuhls <bernd.kuhls@t-online.de> | ||||
|  for fixing possible compilation errors with libjpeg | ||||
|  | ||||
| Timo Weing<6E>rtner <timo@tiwe.de> | ||||
|  for reporting an integer overflow in calculating the disk use percentage if there's | ||||
|  more than 20TB of recordings | ||||
|   | ||||
							
								
								
									
										2
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								HISTORY
									
									
									
									
									
								
							| @@ -9583,3 +9583,5 @@ Video Disk Recorder Revision History | ||||
|   Haubrich). | ||||
| - Fixed a memory leak in handling the NIT (thanks to Helmut Binder). | ||||
| - Fixed a possible memory leak in creating fonts (reported by Helmut Binder). | ||||
| - Fixed calculating the disk use percentage if there's more than 20TB of recordings | ||||
|   (reported by Timo Weing<6E>rtner). | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  * See the main source file 'vdr.c' for copyright information and | ||||
|  * how to reach the author. | ||||
|  * | ||||
|  * $Id: videodir.c 4.1 2015/08/11 13:39:59 kls Exp $ | ||||
|  * $Id: videodir.c 4.1.1.1 2021/12/27 11:18:40 kls Exp $ | ||||
|  */ | ||||
|  | ||||
| #include "videodir.h" | ||||
| @@ -158,7 +158,7 @@ int cVideoDirectory::VideoDiskSpace(int *FreeMB, int *UsedMB) | ||||
|      *FreeMB = free; | ||||
|   if (UsedMB) | ||||
|      *UsedMB = used; | ||||
|   return (free + used) ? used * 100 / (free + used) : 0; | ||||
|   return (free + used) ? round(double(used) * 100 / (free + used)) : 0; | ||||
| } | ||||
|  | ||||
| cString cVideoDirectory::PrefixVideoFileName(const char *FileName, char Prefix) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user