diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2008-02-10 12:41:18 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2008-02-10 12:41:18 +0100 |
commit | 47ea5cb1d0e3fa241e9676511ee197d1428bf349 (patch) | |
tree | 5f2f168b90c4200d14fc8c230c97d23230877c10 /tools.c | |
parent | b678d5812cd4279a8f7b03c7810cd2298ba1476a (diff) | |
download | vdr-47ea5cb1d0e3fa241e9676511ee197d1428bf349.tar.gz vdr-47ea5cb1d0e3fa241e9676511ee197d1428bf349.tar.bz2 |
Fixed detecting directories in cFileNameList::Load()
Diffstat (limited to 'tools.c')
-rw-r--r-- | tools.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.c 1.140 2008/01/13 11:26:30 kls Exp $ + * $Id: tools.c 1.141 2008/02/10 12:40:36 kls Exp $ */ #include "tools.h" @@ -1241,8 +1241,8 @@ bool cFileNameList::Load(const char *Directory, bool DirsOnly) if (strcmp(e->d_name, ".") && strcmp(e->d_name, "..")) { if (DirsOnly) { struct stat ds; - if (stat(e->d_name, &ds) == 0) { - if (S_ISDIR(ds.st_mode)) + if (stat(AddDirectory(Directory, e->d_name), &ds) == 0) { + if (!S_ISDIR(ds.st_mode)) continue; } } |