mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed deleting recordings that have been removed externally when running out of disk space
This commit is contained in:
parent
cf1941ca01
commit
7bba79ef0a
@ -1781,3 +1781,7 @@ Pekka Mauno <pekka.mauno@iki.fi>
|
||||
|
||||
Alexander Wenzel <hondansx@gmx.de>
|
||||
for fixing the shutdown timeout
|
||||
|
||||
Jan Lenz <email@JanLenz.de>
|
||||
for reporting a bug in deleting recordings that have been removed externally when
|
||||
running out of disk space
|
||||
|
2
HISTORY
2
HISTORY
@ -4432,3 +4432,5 @@ Video Disk Recorder Revision History
|
||||
- Fixed the shutdown timeout (thanks to Alexander Wenzel).
|
||||
- Only calling RemoveEmptyVideoDirectories() once in case a recording has been
|
||||
deleted (reported by Hardy Flor).
|
||||
- Fixed deleting recordings that have been removed externally when running out of
|
||||
disk space (reported by Jan Lenz).
|
||||
|
13
recording.c
13
recording.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: recording.c 1.141 2006/03/19 14:08:58 kls Exp $
|
||||
* $Id: recording.c 1.142 2006/03/19 14:33:18 kls Exp $
|
||||
*/
|
||||
|
||||
#include "recording.h"
|
||||
@ -804,11 +804,16 @@ bool cRecording::Delete(void)
|
||||
strncpy(ext, DELEXT, strlen(ext));
|
||||
if (access(NewName, F_OK) == 0) {
|
||||
// the new name already exists, so let's remove that one first:
|
||||
isyslog("removing recording %s", NewName);
|
||||
isyslog("removing recording '%s'", NewName);
|
||||
RemoveVideoFile(NewName);
|
||||
}
|
||||
isyslog("deleting recording %s", FileName());
|
||||
result = RenameVideoFile(FileName(), NewName);
|
||||
isyslog("deleting recording '%s'", FileName());
|
||||
if (access(FileName(), F_OK) == 0)
|
||||
result = RenameVideoFile(FileName(), NewName);
|
||||
else {
|
||||
isyslog("recording '%s' vanished", FileName());
|
||||
result = true; // well, we were going to delete it, anyway
|
||||
}
|
||||
}
|
||||
free(NewName);
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user