summaryrefslogtreecommitdiff
path: root/PLUGINS/src/pictures
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-02-17 14:02:13 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2012-02-17 14:02:13 +0100
commit882691e32f4b2488aa23e0844cc6185cd89e3301 (patch)
treecc790e849dea3586c4d959919d8a6731995c03f4 /PLUGINS/src/pictures
parentf1eecdeb1c10e51a85a33ed41aacd34a9e2353f0 (diff)
downloadvdr-882691e32f4b2488aa23e0844cc6185cd89e3301.tar.gz
vdr-882691e32f4b2488aa23e0844cc6185cd89e3301.tar.bz2
cReadDir::Next() now skips directory entries "." and ".."
Diffstat (limited to 'PLUGINS/src/pictures')
-rw-r--r--PLUGINS/src/pictures/HISTORY4
-rw-r--r--PLUGINS/src/pictures/entry.c14
-rw-r--r--PLUGINS/src/pictures/pictures.c4
3 files changed, 12 insertions, 10 deletions
diff --git a/PLUGINS/src/pictures/HISTORY b/PLUGINS/src/pictures/HISTORY
index 7c2f89f8..5ea878fd 100644
--- a/PLUGINS/src/pictures/HISTORY
+++ b/PLUGINS/src/pictures/HISTORY
@@ -63,3 +63,7 @@ VDR Plugin 'pictures' Revision History
2012-01-08:
- Added option -o to pic2mpg.
+
+2012-02-17:
+
+- cReadDir::Next() now skips directory entries "." and "..".
diff --git a/PLUGINS/src/pictures/entry.c b/PLUGINS/src/pictures/entry.c
index 427585e6..8c124b5d 100644
--- a/PLUGINS/src/pictures/entry.c
+++ b/PLUGINS/src/pictures/entry.c
@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
- * $Id: entry.c 1.3 2008/02/17 13:42:34 kls Exp $
+ * $Id: entry.c 2.1 2012/02/17 14:00:28 kls Exp $
*/
#include "entry.h"
@@ -48,13 +48,11 @@ void cPictureEntry::Load(void) const
if (d.Ok()) {
struct dirent *e;
while ((e = d.Next()) != NULL) {
- if (strcmp(e->d_name, ".") && strcmp(e->d_name, "..")) {
- struct stat ds;
- if (stat(AddDirectory(Directory, e->d_name), &ds) == 0) {
- if (!entries)
- entries = new cList<cPictureEntry>;
- entries->Add(new cPictureEntry(e->d_name, this, S_ISDIR(ds.st_mode)));
- }
+ struct stat ds;
+ if (stat(AddDirectory(Directory, e->d_name), &ds) == 0) {
+ if (!entries)
+ entries = new cList<cPictureEntry>;
+ entries->Add(new cPictureEntry(e->d_name, this, S_ISDIR(ds.st_mode)));
}
}
if (entries)
diff --git a/PLUGINS/src/pictures/pictures.c b/PLUGINS/src/pictures/pictures.c
index 8a890b1c..77fb4216 100644
--- a/PLUGINS/src/pictures/pictures.c
+++ b/PLUGINS/src/pictures/pictures.c
@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
- * $Id: pictures.c 2.3 2011/02/20 16:50:01 kls Exp $
+ * $Id: pictures.c 2.4 2012/02/17 14:00:48 kls Exp $
*/
#include <getopt.h>
@@ -11,7 +11,7 @@
#include "menu.h"
#include "player.h"
-static const char *VERSION = "0.1.0";
+static const char *VERSION = "0.1.1";
static const char *DESCRIPTION = trNOOP("A simple picture viewer");
static const char *MAINMENUENTRY = trNOOP("Pictures");