Skip to content

Commit

Permalink
Check if BUILD_CONFIG_DATA_DIR exists before mounting
Browse files Browse the repository at this point in the history
Fixes #2706
  • Loading branch information
tobbi committed Dec 25, 2023
1 parent 3941d49 commit efb8ccd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/supertux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,12 @@ void PhysfsSubsystem::find_mount_datadir()
if (FileSystem::exists(FileSystem::join(BUILD_DATA_DIR, "credits.stxt")))
{
m_datadir = BUILD_DATA_DIR;

// Add config dir for supplemental files
PHYSFS_mount(std::filesystem::canonical(BUILD_CONFIG_DATA_DIR).string().c_str(), nullptr, 1);
if (FileSystem::is_directory(BUILD_CONFIG_DATA_DIR))
{
PHYSFS_mount(std::filesystem::canonical(BUILD_CONFIG_DATA_DIR).string().c_str(), nullptr, 1);
}
}
else
{
Expand Down

0 comments on commit efb8ccd

Please sign in to comment.