mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-06 05:04:17 +01:00
added multiline and xml support to ffGetPropValue
This commit is contained in:
@@ -236,13 +236,10 @@ static void getMate(FFinstance* instance, FFWMDEResult* result)
|
||||
|
||||
//I parse the file 3 times by purpose, because the properties are not guaranteed to be in order
|
||||
ffParsePropFile("/usr/share/mate-about/mate-version.xml", "<platform>", &result->deVersion);
|
||||
ffStrbufSubstrBeforeFirstC(&result->deVersion, '<');
|
||||
ffStrbufAppendC(&result->deVersion, '.');
|
||||
ffParsePropFile("/usr/share/mate-about/mate-version.xml", "<minor>", &result->deVersion);
|
||||
ffStrbufSubstrBeforeFirstC(&result->deVersion, '<');
|
||||
ffStrbufAppendC(&result->deVersion, '.');
|
||||
ffParsePropFile("/usr/share/mate-about/mate-version.xml", "<micro>", &result->deVersion);
|
||||
ffStrbufSubstrBeforeFirstC(&result->deVersion, '<');
|
||||
|
||||
if(result->deVersion.length == 0 && instance->config.allowSlowOperations)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user