diff --git a/src/core/host_interface.cpp b/src/core/host_interface.cpp index 4cd34ae1e..b96d256b1 100644 --- a/src/core/host_interface.cpp +++ b/src/core/host_interface.cpp @@ -453,6 +453,13 @@ void HostInterface::SetUserDirectory() #endif Log_InfoPrintf("User directory: %s", m_user_directory.c_str()); + + // Change to the user directory so that all default/relative paths in the config are after this. + if (!m_user_directory.empty()) + { + if (!FileSystem::SetWorkingDirectory(m_user_directory.c_str())) + Log_ErrorPrintf("Failed to set working directory to '%s'", m_user_directory.c_str()); + } } std::string HostInterface::GetUserDirectoryRelativePath(const char* format, ...)