Honor the XDG_DATA_HOME env var and use the approved default as per specification.

This commit is contained in:
MineBill
2023-11-05 19:36:01 +02:00
parent 22e34cb2b4
commit 267e8daba5

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;