diff options
author | Johns <johns98@gmx.net> | 2012-09-09 16:49:58 +0200 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2012-09-09 16:49:58 +0200 |
commit | 481753bcc989ade3f46aba4c0a1289c168c1af1d (patch) | |
tree | 37ea902121585cacffd7301573dfa2f3ac4f22f1 | |
parent | 8f78b33fec109fcd8bfda99add349bf7219c4dc5 (diff) | |
download | vdr-plugin-play-481753bcc989ade3f46aba4c0a1289c168c1af1d.tar.gz vdr-plugin-play-481753bcc989ade3f46aba4c0a1289c168c1af1d.tar.bz2 |
Fix bug: Filter could destroy errno.
-rw-r--r-- | readdir.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -302,9 +302,12 @@ int ScanDirectory(const char *name, int flag_dir, const NameFilter * filter, char *tmp; // skip hidden files, wrong kind, wrong suffix + save = errno; if (flag_dir ? !FilterIsDirectory(entry) : !FilterIsFile(entry)) { + errno = save; continue; } + errno = save; len = _D_ALLOC_NAMLEN(entry); if (!(tmp = malloc(len))) { |