diff --git a/CONTRIBUTORS b/CONTRIBUTORS index e5157e04..c86c2d3f 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -271,3 +271,8 @@ Michael Moster Tobias Kerner for helping to debug a problem with wrong EPG data in the Schedules menu + +Dirk Wiebel + 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);