mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed deleting small files
This commit is contained in:
parent
820de6bf59
commit
5d34487621
@ -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: recording.c 1.7 2000/04/30 10:22:13 kls Exp $
|
* $Id: recording.c 1.8 2000/05/13 16:16:56 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
@ -61,7 +61,6 @@ void AssertFreeDiskSpace(void)
|
|||||||
// it will get removed during the next call.
|
// it will get removed during the next call.
|
||||||
static time_t LastFreeDiskCheck = 0;
|
static time_t LastFreeDiskCheck = 0;
|
||||||
if (time(NULL) - LastFreeDiskCheck > DISKCHECKDELTA) {
|
if (time(NULL) - LastFreeDiskCheck > DISKCHECKDELTA) {
|
||||||
LastFreeDiskCheck = time(NULL);
|
|
||||||
if (LowDiskSpace()) {
|
if (LowDiskSpace()) {
|
||||||
// Remove the oldest file that has been "deleted":
|
// Remove the oldest file that has been "deleted":
|
||||||
cRecordings Recordings;
|
cRecordings Recordings;
|
||||||
@ -97,6 +96,7 @@ void AssertFreeDiskSpace(void)
|
|||||||
// Unable to free disk space, but there's nothing we can do about that...
|
// Unable to free disk space, but there's nothing we can do about that...
|
||||||
esyslog(LOG_ERR, "low disk space, but no recordings to delete");
|
esyslog(LOG_ERR, "low disk space, but no recordings to delete");
|
||||||
}
|
}
|
||||||
|
LastFreeDiskCheck = time(NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user