diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-02-12 10:19:03 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-02-12 10:19:03 +0100 |
commit | 5b4507da05453538b40d6c8801223238b11cc482 (patch) | |
tree | 870a31634a799acc1a3f81e98832880b88dd7587 | |
parent | 7f244d5c9c6a176bd1008f0ea10c9649dba7c1a9 (diff) | |
download | vdr-5b4507da05453538b40d6c8801223238b11cc482.tar.gz vdr-5b4507da05453538b40d6c8801223238b11cc482.tar.bz2 |
Fixed handling symbolic links in cRecordings::ScanVideoDir()
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | recording.c | 7 | ||||
-rw-r--r-- | tools.h | 4 |
4 files changed, 10 insertions, 6 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index ea353802..b5a150fa 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -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 @@ -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). diff --git a/recording.c b/recording.c index c6460f27..e50dfcb7 100644 --- a/recording.c +++ b/recording.c @@ -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) { @@ -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); |