forked from mirror/openmw-tes3mp
Another file search fix
This commit is contained in:
parent
877cb2aca7
commit
b2c6d52db1
3 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue