File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 11#include "fastfetch.h"
22#include "common/caching.h"
3+ #include "common/parsing.h"
34#include "detection/qt.h"
45#include "detection/gtk.h"
56#include "detection/displayserver.h"
@@ -20,7 +21,7 @@ static void initConfigDirs(FFstate* state)
2021 ffListInit (& state -> configDirs , sizeof (FFstrbuf ));
2122
2223 const char * xdgConfigHome = getenv ("XDG_CONFIG_HOME" );
23- if (xdgConfigHome != NULL )
24+ if (ffStrSet ( xdgConfigHome ) )
2425 {
2526 FFstrbuf * buffer = (FFstrbuf * ) ffListAdd (& state -> configDirs );
2627 ffStrbufInitA (buffer , 64 );
@@ -54,6 +55,12 @@ static void initConfigDirs(FFstate* state)
5455 uint32_t colonIndex = ffStrbufNextIndexC (& xdgConfigDirs , startIndex , ':' );
5556 xdgConfigDirs .chars [colonIndex ] = '\0' ;
5657
58+ if (!ffStrSet (xdgConfigDirs .chars + startIndex ))
59+ {
60+ startIndex = colonIndex + 1 ;
61+ continue ;
62+ }
63+
5764 FFstrbuf * buffer = (FFstrbuf * ) ffListAdd (& state -> configDirs );
5865 ffStrbufInitA (buffer , 64 );
5966 ffStrbufAppendS (buffer , xdgConfigDirs .chars + startIndex );
Original file line number Diff line number Diff line change @@ -107,11 +107,6 @@ static void detectGTKFromConfigFile(const char* filename, FFGTKResult* result)
107107
108108static void detectGTKFromConfigDir (FFstrbuf * configDir , const char * version , FFGTKResult * result )
109109{
110- //In case of an empty env variable
111- ffStrbufTrim (configDir , ' ' );
112- if (configDir -> length == 0 )
113- return ;
114-
115110 uint32_t configDirLength = configDir -> length ;
116111
117112 // <configdir>/gtk-<version>.0/settings.ini
You can’t perform that action at this time.
0 commit comments