[*] Alternative solution for FOLDERID_UserProgramFiles when targeting <= Windows Vista
This commit is contained in:
parent
61df62213f
commit
ebce7e0048
@ -177,7 +177,20 @@ namespace Aurora::IO::FS
|
||||
gUserHomeDirectory = GetSpecialDir(FOLDERID_Profile);
|
||||
gAdminWritableAppDirectory = gApplicationData;
|
||||
gUserWritableAppData = gHomeDirectory;
|
||||
gProgramsFolder = GetSpecialDir(FOLDERID_UserProgramFiles);
|
||||
gProgramsFolder = AuSwInfo::IsWindows7OrGreater() ? GetSpecialDir(FOLDERID_UserProgramFiles) : "";
|
||||
if (gProgramsFolder.empty())
|
||||
{
|
||||
gProgramsFolder = GetSpecialDir(FOLDERID_Documents);
|
||||
if (gProgramsFolder.size())
|
||||
{
|
||||
gProgramsFolder += "\\Programs";
|
||||
|
||||
if (!AuFS::DirExists(gProgramsFolder))
|
||||
{
|
||||
AuFS::DirMk(gProgramsFolder);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#elif defined(AURORA_PLATFORM_LINUX) || defined(AURORA_PLATFORM_BSD)
|
||||
|
Loading…
Reference in New Issue
Block a user