1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

No longer trying to delete old recordings in AssertFreeDiskSpace() if the given Priority is less than 1

This commit is contained in:
Klaus Schmidinger 2013-08-21 13:56:33 +02:00
parent 7a359a958e
commit a0a4421278
2 changed files with 28 additions and 22 deletions

View File

@ -7869,3 +7869,5 @@ Video Disk Recorder Revision History
position has been reached. position has been reached.
- The LCARS skin now shows the source value of the current channel in its channel display. - The LCARS skin now shows the source value of the current channel in its channel display.
- Fixed asserting free disk space in the cutter. - Fixed asserting free disk space in the cutter.
- No longer trying to delete old recordings in AssertFreeDiskSpace() if the given
Priority is less than 1.

View File

@ -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 3.1 2013/04/11 08:14:01 kls Exp $ * $Id: recording.c 3.2 2013/08/21 13:56:33 kls Exp $
*/ */
#include "recording.h" #include "recording.h"
@ -178,6 +178,7 @@ void AssertFreeDiskSpace(int Priority, bool Force)
return; // the next call will actually remove it return; // the next call will actually remove it
} }
// No "deleted" files to remove, so let's see if we can delete a recording: // No "deleted" files to remove, so let's see if we can delete a recording:
if (Priority > 0) {
isyslog("...no deleted recording found, trying to delete an old recording..."); isyslog("...no deleted recording found, trying to delete an old recording...");
cThreadLock RecordingsLock(&Recordings); cThreadLock RecordingsLock(&Recordings);
if (Recordings.Count()) { if (Recordings.Count()) {
@ -206,6 +207,9 @@ void AssertFreeDiskSpace(int Priority, bool Force)
} }
// 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...
isyslog("...no old recording found, giving up"); isyslog("...no old recording found, giving up");
}
else
isyslog("...no deleted recording found, priority %d too low to trigger deleting an old recording", Priority);
Skins.QueueMessage(mtWarning, tr("Low disk space!"), 5, -1); Skins.QueueMessage(mtWarning, tr("Low disk space!"), 5, -1);
} }
LastFreeDiskCheck = time(NULL); LastFreeDiskCheck = time(NULL);