summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-03-16 12:19:14 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-03-16 12:19:14 +0100
commit45180b762fbb9f51352e75cf55d1672c1b1f961e (patch)
treed73b1231b4dc3e28b0c4ecf7a0bf83b44a9f3054
parent80bc1322367661b7897c26eb5a411f5a7640433b (diff)
downloadvdr-45180b762fbb9f51352e75cf55d1672c1b1f961e.tar.gz
vdr-45180b762fbb9f51352e75cf55d1672c1b1f961e.tar.bz2
Physically removing a deleted recording if one with the same name shall be deleted again
-rw-r--r--HISTORY2
-rw-r--r--recording.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/HISTORY b/HISTORY
index 5d59dac0..8a1c9544 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1101,3 +1101,5 @@ Video Disk Recorder Revision History
set to a small value (based on code from Markus Lang).
- Changed the title of the "Main" menu to "VDR".
- Fixed displaying a system message while the replay mode is being shown.
+- Physically removing a deleted recording if one with the same name shall be
+ deleted again.
diff --git a/recording.c b/recording.c
index abce664d..56ea0565 100644
--- a/recording.c
+++ b/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.56 2002/03/09 10:43:42 kls Exp $
+ * $Id: recording.c 1.57 2002/03/16 12:17:44 kls Exp $
*/
#include "recording.h"
@@ -554,6 +554,11 @@ bool cRecording::Delete(void)
char *ext = strrchr(NewName, '.');
if (strcmp(ext, RECEXT) == 0) {
strncpy(ext, DELEXT, strlen(ext));
+ if (access(NewName, F_OK) == 0) {
+ // the new name already exists, so let's remove that one first:
+ isyslog(LOG_INFO, "removing recording %s", NewName);
+ RemoveVideoFile(NewName);
+ }
isyslog(LOG_INFO, "deleting recording %s", FileName());
result = RenameVideoFile(FileName(), NewName);
}