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

Fixed handling symbolic links in cRecordings::ScanVideoDir()

This commit is contained in:
Klaus Schmidinger 2005-02-12 10:19:03 +01:00
parent 7f244d5c9c
commit 5b4507da05
4 changed files with 10 additions and 6 deletions

View File

@ -192,6 +192,7 @@ Stefan Huelswitt <huels@iname.com>
for fixing a possible race condition in cDevice::Action() and cTSBuffer::Action()
for reporting several memory leaks that were introduced through the use of cString
for adding MPEG1 replay capability to cPesAssembler
for fixing handling symbolic links in cRecordings::ScanVideoDir()
Ulrich Röder <roeder@efr-net.de>
for pointing out that there are channels that have a symbol rate higher than 27500

View File

@ -3374,7 +3374,7 @@ Video Disk Recorder Revision History
out).
- Added MPEG1 replay capability to cPesAssembler (thanks to Stefan Huelswitt).
2005-02-08: Version 1.3.21
2005-02-12: Version 1.3.21
- Fixed cDvbDevice::SetAudioTrackDevice() to avoid a blank screen after switching
back to live mode if a recording is currently active on the primary device.
@ -3384,3 +3384,5 @@ Video Disk Recorder Revision History
- Restricted the "setting audio track" log message to automatic changes during replay.
- Fixed handling Transfer Mode for radio channels (thanks to Andreas Regel for
reporting this one).
- Fixed handling symbolic links in cRecordings::ScanVideoDir() (thanks to Stefan
Huelswitt).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: recording.c 1.95 2005/02/06 09:46:31 kls Exp $
* $Id: recording.c 1.96 2005/02/12 10:17:47 kls Exp $
*/
#include "recording.h"
@ -637,8 +637,9 @@ void cRecordings::ScanVideoDir(const char *DirName)
struct stat st;
if (stat(buffer, &st) == 0) {
if (S_ISLNK(st.st_mode)) {
free(buffer);
buffer = ReadLink(buffer);
char *old = buffer;
buffer = ReadLink(old);
free(old);
if (!buffer)
continue;
if (stat(buffer, &st) != 0) {

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: tools.h 1.66 2005/02/05 10:00:22 kls Exp $
* $Id: tools.h 1.67 2005/02/12 10:17:14 kls Exp $
*/
#ifndef __TOOLS_H
@ -95,7 +95,7 @@ bool DirectoryOk(const char *DirName, bool LogErrors = false);
bool MakeDirs(const char *FileName, bool IsDirectory = false);
bool RemoveFileOrDir(const char *FileName, bool FollowSymlinks = false);
bool RemoveEmptyDirectories(const char *DirName, bool RemoveThis = false);
char *ReadLink(const char *FileName);
char *ReadLink(const char *FileName); ///< returns a new strings allocated on the heap, which the caller must delete (or NULL in case of an error)
bool SpinUpDisk(const char *FileName);
time_t LastModifiedTime(const char *FileName);
cString WeekDayName(int WeekDay);