summaryrefslogtreecommitdiff
path: root/recording.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-02-13 11:49:43 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2012-02-13 11:49:43 +0100
commitadc88b3790aa66fdc9ce2f32ef68c34d81532369 (patch)
tree27df42b552f261be510d3803621066cb46885301 /recording.c
parent573449e9353b20e61a85965c7db05481d2338bfc (diff)
downloadvdr-adc88b3790aa66fdc9ce2f32ef68c34d81532369.tar.gz
vdr-adc88b3790aa66fdc9ce2f32ef68c34d81532369.tar.bz2
Reactivated "Fixed handling symbolic links in cRecordings::ScanVideoDir()"
Diffstat (limited to 'recording.c')
-rw-r--r--recording.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/recording.c b/recording.c
index 87886557..4a856bb8 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.46 2012/01/26 10:02:29 kls Exp $
+ * $Id: recording.c 2.47 2012/02/13 11:49:43 kls Exp $
*/
#include "recording.h"
@@ -1112,7 +1112,7 @@ void cRecordings::ScanVideoDir(const char *DirName, bool Foreground, int LinkLev
if (strcmp(e->d_name, ".") && strcmp(e->d_name, "..")) {
cString buffer = 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) {
@@ -1120,6 +1120,8 @@ void cRecordings::ScanVideoDir(const char *DirName, bool Foreground, int LinkLev
continue;
}
Link = 1;
+ if (stat(buffer, &st) != 0)
+ continue;
}
if (S_ISDIR(st.st_mode)) {
if (endswith(buffer, deleted ? DELEXT : RECEXT)) {