From ba8dcbc19df07f3dfb0b126d74bd0889798347f4 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Mon, 9 Feb 2015 14:11:09 +0000 Subject: [PATCH] Fix BSA loading detection for Fallout games. Fallout 3 and Fallout: New Vegas can load BSAs using .esm files as well as .esp files. --- src/backend/metadata.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/metadata.cpp b/src/backend/metadata.cpp index aa8e89d4..5e9ebef2 100644 --- a/src/backend/metadata.cpp +++ b/src/backend/metadata.cpp @@ -942,8 +942,8 @@ namespace loot { return boost::filesystem::exists(game.DataPath() / (name.substr(0, name.length() - 3) + "bsa")); } else { - //Oblivion, FO3 and FNV .esp files can load BSAs which begin with the plugin basename. - if (boost::iends_with(name, ".esp")) { + //Oblivion .esp files and FO3, FNV plugins can load BSAs which begin with the plugin basename. + if (game.Id() != Game::tes4 || boost::iends_with(name, ".esp")) { string basename = name.substr(0, name.length() - 4); for (boost::filesystem::directory_iterator it(game.DataPath()); it != boost::filesystem::directory_iterator(); ++it) { if (it->path().extension().string() == ".bsa" && boost::istarts_with(it->path().filename().string(), basename))