mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed calculating the disk use percentage if there's more than 20TB of recordings
This commit is contained in:
parent
a16a451c1f
commit
2dc383d362
@ -3674,3 +3674,7 @@ Jens Schleusener <Jens.Schleusener@fossies.org>
|
|||||||
|
|
||||||
Bernd Kuhls <bernd.kuhls@t-online.de>
|
Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||||
for fixing possible compilation errors with libjpeg
|
for fixing possible compilation errors with libjpeg
|
||||||
|
|
||||||
|
Timo Weingä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).
|
Haubrich).
|
||||||
- Fixed a memory leak in handling the NIT (thanks to Helmut Binder).
|
- 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 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ärtner).
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "videodir.h"
|
||||||
@ -158,7 +158,7 @@ int cVideoDirectory::VideoDiskSpace(int *FreeMB, int *UsedMB)
|
|||||||
*FreeMB = free;
|
*FreeMB = free;
|
||||||
if (UsedMB)
|
if (UsedMB)
|
||||||
*UsedMB = used;
|
*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)
|
cString cVideoDirectory::PrefixVideoFileName(const char *FileName, char Prefix)
|
||||||
|
Loading…
Reference in New Issue
Block a user