Skip to content

Commit 2ae9d01

Browse files
osalbahrCarterLi
authored andcommitted
OS (Linux): Better Ubuntu flavor detection
- Fixes #1974
1 parent e953937 commit 2ae9d01

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/detection/os/os_linux.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ FF_MAYBE_UNUSED static bool detectArmbianVersion(FFOSResult* result)
6161

6262
FF_MAYBE_UNUSED static void getUbuntuFlavour(FFOSResult* result)
6363
{
64-
const char* xdgConfigDirs = getenv("XDG_CONFIG_DIRS");
65-
if(!ffStrSet(xdgConfigDirs))
66-
return;
67-
6864
if (detectArmbianVersion(result))
6965
return;
7066
else if(ffStrbufStartsWithS(&result->prettyName, "Linux Lite "))
@@ -104,6 +100,10 @@ FF_MAYBE_UNUSED static void getUbuntuFlavour(FFOSResult* result)
104100
return;
105101
}
106102

103+
const char* xdgConfigDirs = getenv("XDG_CONFIG_DIRS");
104+
if(!ffStrSet(xdgConfigDirs))
105+
return;
106+
107107
if(ffStrContains(xdgConfigDirs, "kde") || ffStrContains(xdgConfigDirs, "plasma") || ffStrContains(xdgConfigDirs, "kubuntu"))
108108
{
109109
ffStrbufSetStatic(&result->name, "Kubuntu");

0 commit comments

Comments
 (0)