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

@@ -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) {