Skip to content

Commit

Permalink
Fix #5174: DR crash on startup when encountering a file in any VFS se…
Browse files Browse the repository at this point in the history
…arch path with foreign characters in their filename.

Since the engine doesn't load these files, DR will issue a warning and skip that file as well.
  • Loading branch information
codereader committed Mar 24, 2020
1 parent a20898d commit b1b390a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions radiant/vfs/Doom3FileSystem.cpp
Expand Up @@ -260,8 +260,17 @@ void Doom3FileSystem::initDirectory(const std::string& inputPath)
{
os::foreachItemInDirectory(path, [&](const fs::path& file)
{
// Just insert the name, it will get sorted correctly.
filenameList.insert(file.filename().string());
try
{
// Just insert the name, it will get sorted correctly.
filenameList.insert(file.filename().string());
}
catch (std::system_error& ex)
{
rWarning() << "[vfs] Skipping file " << file.filename().wstring() <<
" - possibly unsupported characters in filename? " <<
"(Exception: " << ex.what() << ")" << std::endl;
}
});
}
catch (os::DirectoryNotFoundException&)
Expand Down

0 comments on commit b1b390a

Please sign in to comment.