1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed creating the edited version directory if a relative file name is given in the call to 'vdr --edit'

This commit is contained in:
Klaus Schmidinger 2012-12-05 11:12:33 +01:00
parent 41f94447d6
commit 0f7b73016a
2 changed files with 6 additions and 2 deletions

View File

@ -7390,3 +7390,6 @@ Video Disk Recorder Revision History
- When regenerating the index of a recording, the frame rate stored in the info file - When regenerating the index of a recording, the frame rate stored in the info file
is now automatically fixed if it differs from the value detected by the frame is now automatically fixed if it differs from the value detected by the frame
detector. detector.
- Fixed creating the edited version directory if a relative file name is given in
the call to 'vdr --edit' (the '/video' part was stripped from the given file name
even if it wasn't there).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: recording.c 2.76 2012/12/05 10:32:00 kls Exp $ * $Id: recording.c 2.77 2012/12/05 11:08:47 kls Exp $
*/ */
#include "recording.h" #include "recording.h"
@ -691,7 +691,8 @@ cRecording::cRecording(const char *FileName)
FileName = fileName = strdup(FileName); FileName = fileName = strdup(FileName);
if (*(fileName + strlen(fileName) - 1) == '/') if (*(fileName + strlen(fileName) - 1) == '/')
*(fileName + strlen(fileName) - 1) = 0; *(fileName + strlen(fileName) - 1) = 0;
FileName += strlen(VideoDirectory) + 1; if (strstr(FileName, VideoDirectory) == FileName)
FileName += strlen(VideoDirectory) + 1;
const char *p = strrchr(FileName, '/'); const char *p = strrchr(FileName, '/');
name = NULL; name = NULL;