diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2021-12-24 10:56:47 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2021-12-24 10:56:47 +0100 |
commit | 104bddc56068d6d613d6f159d5d7380ac0f7ab68 (patch) | |
tree | 0744d870e88b821b39625f2c1784d75709cb4e45 /videodir.c | |
parent | e7107b789e141005c01319a680a43f800e85413c (diff) | |
download | vdr-104bddc56068d6d613d6f159d5d7380ac0f7ab68.tar.gz vdr-104bddc56068d6d613d6f159d5d7380ac0f7ab68.tar.bz2 |
Fixed calculating the disk use percentage if there's more than 20TB of recordings
Diffstat (limited to 'videodir.c')
-rw-r--r-- | videodir.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: videodir.c 5.1 2021/01/19 20:38:28 kls Exp $ + * $Id: videodir.c 5.2 2021/12/24 10:56:47 kls Exp $ */ #include "videodir.h" @@ -163,7 +163,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) |