diff options
-rw-r--r-- | base/plugins.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/base/plugins.cpp b/base/plugins.cpp index 13b18c3eab..cdcb480c40 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -310,10 +310,10 @@ void PluginManager::loadPlugins() { // Load all plugins. // Scan for all plugins in this directory FilesystemNode dir(PLUGIN_DIRECTORY); - if (!dir.isValid() || !dir.isDirectory()) { + FSList files; + if (dir.listDir(files, FilesystemNode::kListFilesOnly)) { error("Couldn't open plugin directory '%s'", PLUGIN_DIRECTORY); } - FSList files(dir.listDir(FilesystemNode::kListFilesOnly)); for (FSList::const_iterator i = files.begin(); i != files.end(); ++i) { Common::String name(i->displayName()); |