summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-04-06 15:28:08 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-04-06 15:28:08 +0200
commit3581c20976445d6213bfcf74c26cecc5cd8861af (patch)
tree0cb13f564cf041e3ec65b7fbc88d4526e5ae7536
parent367b3f8c7d128f6e7f48d2304440f08577ab0024 (diff)
downloadvdr-3581c20976445d6213bfcf74c26cecc5cd8861af.tar.gz
vdr-3581c20976445d6213bfcf74c26cecc5cd8861af.tar.bz2
Fixed a bug in the editing process
-rw-r--r--CONTRIBUTORS5
-rw-r--r--HISTORY3
-rw-r--r--dvbapi.c14
3 files changed, 21 insertions, 1 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index e5157e04..c86c2d3f 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -271,3 +271,8 @@ Michael Moster <dvb@juelich-gmbh.de>
Tobias Kerner <tobschle@gmx.de>
for helping to debug a problem with wrong EPG data in the Schedules menu
+
+Dirk Wiebel <dirk@wiebel.de>
+ for reporting a bug in the editing process in case a previously edited file
+ with the same name was manually deleted on a system with more than one video
+ directory
diff --git a/HISTORY b/HISTORY
index db6f505e..50536469 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1186,3 +1186,6 @@ Video Disk Recorder Revision History
to an other DVB card (suggested by Sergei Haller).
- Fixed a possible hangup when reading a broken epg.data file (thanks to Henning
Holtschneider for pointing this one out).
+- Fixed a bug in the editing process in case a previously edited file with the
+ same name was manually deleted on a system with more than one video directory
+ (thanks to Dirk Wiebel for reporting this one).
diff --git a/dvbapi.c b/dvbapi.c
index 83ea0627..e9e67e4e 100644
--- a/dvbapi.c
+++ b/dvbapi.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbapi.c 1.168 2002/04/06 13:14:40 kls Exp $
+ * $Id: dvbapi.c 1.169 2002/04/06 15:21:29 kls Exp $
*/
#include "dvbapi.h"
@@ -1613,6 +1613,18 @@ bool cVideoCutter::Start(const char *FileName)
cRecording Recording(FileName);
const char *evn = Recording.PrefixFileName('%');
if (evn && RemoveVideoFile(evn) && MakeDirs(evn, true)) {
+ // XXX this can be removed once RenameVideoFile() follows symlinks (see videodir.c)
+ // remove a possible deleted recording with the same name to avoid symlink mixups:
+ char *s = strdup(evn);
+ char *e = strrchr(s, '.');
+ if (e) {
+ if (strcmp(e, ".rec") == 0) {
+ strcpy(e, ".del");
+ RemoveVideoFile(s);
+ }
+ }
+ delete s;
+ // XXX
editedVersionName = strdup(evn);
Recording.WriteSummary();
cuttingBuffer = new cCuttingBuffer(FileName, editedVersionName);