Compare commits

...

2 Commits

Author SHA1 Message Date
956bad3068 Update README.md 2024-12-31 13:21:14 +01:00
d9a920b062 Use $HOME variable if it exists
Signed-off-by: Ismail Dönmez <ismail@i10z.com>
2024-09-22 10:55:54 +02:00
2 changed files with 15 additions and 7 deletions

View File

@ -164,3 +164,4 @@ Donators
* _Berwyn H_
* _bwitt_
* _Ismail_
* _Radon_

View File

@ -859,6 +859,12 @@ namespace gourou
std::string DRMProcessor::getDefaultAdeptDir(void)
{
#ifndef DEFAULT_ADEPT_DIR
const char* home = getenv("HOME");
if (home)
return home + std::string("/.config/adept/");
else
{
const char* user = getenv("USER");
if (user && user[0])
@ -867,6 +873,7 @@ namespace gourou
}
else
return LOCAL_ADEPT_DIR;
}
#else
return DEFAULT_ADEPT_DIR "/";
#endif