From f99c6783a31233c5c5bed90f4a62af6d1707f6c0 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sat, 15 Aug 2009 21:39:28 +0000 Subject: [PATCH] Skip directories when trying to find translators. This prevents the syslog from showing runtime_loader errors about trouble reading ELF headers on a hybrid build, as it would try to call load_add_on() on the subdir entry itself too. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32428 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/translation/TranslatorRoster.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kits/translation/TranslatorRoster.cpp b/src/kits/translation/TranslatorRoster.cpp index 6236989319..da7f78be8a 100644 --- a/src/kits/translation/TranslatorRoster.cpp +++ b/src/kits/translation/TranslatorRoster.cpp @@ -438,6 +438,9 @@ BTranslatorRoster::Private::AddPath(const char* path, int32* _added) entry_ref ref; while (directory.GetNextRef(&ref) == B_OK) { + BEntry entry(&ref); + if (entry.IsDirectory()) + continue; if (CreateTranslators(ref, count) == B_OK) count++;