Merge branch 'honor-xdg_data_home' of https://github.com/MineBill/FlaxEngine into MineBill-honor-xdg_data_home

This commit is contained in:
Wojtek Figat
2023-11-05 20:51:31 +01:00

View File

@@ -679,8 +679,14 @@ void LinuxFileSystem::GetSpecialFolderPath(const SpecialFolder type, String& res
result = TEXT("/usr/share");
break;
case SpecialFolder::LocalAppData:
result = home;
{
String dataHome;
if (!Platform::GetEnvironmentVariable(TEXT("XDG_DATA_HOME"), dataHome))
result = dataHome;
else
result = home / TEXT(".local/share");
break;
}
case SpecialFolder::ProgramData:
result = String::Empty;
break;