diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2002-04-06 15:28:08 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2002-04-06 15:28:08 +0200 |
commit | 3581c20976445d6213bfcf74c26cecc5cd8861af (patch) | |
tree | 0cb13f564cf041e3ec65b7fbc88d4526e5ae7536 /dvbapi.c | |
parent | 367b3f8c7d128f6e7f48d2304440f08577ab0024 (diff) | |
download | vdr-3581c20976445d6213bfcf74c26cecc5cd8861af.tar.gz vdr-3581c20976445d6213bfcf74c26cecc5cd8861af.tar.bz2 |
Fixed a bug in the editing process
Diffstat (limited to 'dvbapi.c')
-rw-r--r-- | dvbapi.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -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); |