diff --git a/apps/openmw/mwsound/soundmanager.cpp b/apps/openmw/mwsound/soundmanager.cpp index d5bd79fd6..a5ba04e26 100644 --- a/apps/openmw/mwsound/soundmanager.cpp +++ b/apps/openmw/mwsound/soundmanager.cpp @@ -293,7 +293,7 @@ namespace MWSound void SoundManager::streamMusic(const std::string& filename) { - std::string filePath = mMusicLibrary.locate(filename, mFSStrict).string(); + std::string filePath = mMusicLibrary.locate(filename, mFSStrict, true).string(); if(!filePath.empty()) { streamMusicFull(filePath); diff --git a/components/files/filelibrary.cpp b/components/files/filelibrary.cpp index 482b675a9..c11415929 100644 --- a/components/files/filelibrary.cpp +++ b/components/files/filelibrary.cpp @@ -89,12 +89,12 @@ namespace Files } // Searches the library for an item and returns a boost path to it - boost::filesystem::path FileLibrary::locate(std::string item, bool strict, std::string sectionName) + boost::filesystem::path FileLibrary::locate(std::string item, bool strict, bool ignoreExtensions, std::string sectionName) { boost::filesystem::path result(""); if (sectionName == "") { - return FileListLocator(mPriorityList, boost::filesystem::path(item), strict, false); + return FileListLocator(mPriorityList, boost::filesystem::path(item), strict, ignoreExtensions); } else { @@ -103,7 +103,7 @@ namespace Files std::cout << "Warning: There is no section named " << sectionName << "\n"; return result; } - result = FileListLocator(mMap[sectionName], boost::filesystem::path(item), strict, false); + result = FileListLocator(mMap[sectionName], boost::filesystem::path(item), strict, ignoreExtensions); } return result; } diff --git a/components/files/filelibrary.hpp b/components/files/filelibrary.hpp index 55978084f..6abe97269 100644 --- a/components/files/filelibrary.hpp +++ b/components/files/filelibrary.hpp @@ -39,7 +39,7 @@ namespace Files /// Optionally you can provide a specific section /// The result is the first that comes up according to alphabetical /// section naming - boost::filesystem::path locate(std::string item, bool strict, std::string sectionName=""); + boost::filesystem::path locate(std::string item, bool strict, bool ignoreExtensions, std::string sectionName=""); /// Prints all the available sections, used for debugging void printSections();