summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2011-12-10 14:14:58 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2011-12-10 14:14:58 +0100
commit773c4419ea8819279d4dfab2f46f179350bdaa51 (patch)
tree3332a0de72691b9cc2f93e9476e6762a8fca7aaf
parent97d47b6a918fbd715ae81cb39051f3ad219772c4 (diff)
downloadvdr-773c4419ea8819279d4dfab2f46f179350bdaa51.tar.gz
vdr-773c4419ea8819279d4dfab2f46f179350bdaa51.tar.bz2
Fixed handling symbolic links in cRecordings::ScanVideoDir()
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY2
-rw-r--r--recording.c4
3 files changed, 5 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index c3456a2a..c16883bc 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2544,6 +2544,7 @@ Sundararaj Reel <sundararaj.reel@googlemail.com>
for reporting a missing reset of maxNumber in cChannels::Renumber()
for reporting some missing 'const' in tChannelID
for suggesting to add optional case insensitive sorting to cStringList::Sort()
+ for reporting a bug in handling symbolic links in cRecordings::ScanVideoDir()
Ales Jurik <ajurik@quick.cz>
for reporting broken SI data on Czech/Slovak channels after changing the default
diff --git a/HISTORY b/HISTORY
index 34d0e215..259017a8 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6785,3 +6785,5 @@ Video Disk Recorder Revision History
- Removed the '.pl' suffix from svdrpsend.pl (sorry, I missed that one).
- Fixed bonding more than two devices.
+- Fixed handling symbolic links in cRecordings::ScanVideoDir() (reported by
+ Sundararaj Reel).
diff --git a/recording.c b/recording.c
index 6b11fbd3..2a8108bc 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 2.39 2011/12/04 13:51:44 kls Exp $
+ * $Id: recording.c 2.40 2011/12/10 14:12:55 kls Exp $
*/
#include "recording.h"
@@ -1105,7 +1105,7 @@ void cRecordings::ScanVideoDir(const char *DirName, bool Foreground, int LinkLev
if (strcmp(e->d_name, ".") && strcmp(e->d_name, "..")) {
char *buffer = strdup(AddDirectory(DirName, e->d_name));
struct stat st;
- if (stat(buffer, &st) == 0) {
+ if (lstat(buffer, &st) == 0) {
int Link = 0;
if (S_ISLNK(st.st_mode)) {
if (LinkLevel > MAX_LINK_LEVEL) {