mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
Image: don't try to read image file with --logo none
This commit is contained in:
@@ -979,6 +979,7 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con
|
||||
instance->config.logo.paddingTop = 0;
|
||||
instance->config.logo.paddingRight = 0;
|
||||
instance->config.logo.paddingLeft = 0;
|
||||
instance->config.logo.type = FF_LOGO_TYPE_NONE;
|
||||
}
|
||||
}
|
||||
else if(startsWith(key, "--logo"))
|
||||
@@ -998,6 +999,7 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con
|
||||
"iterm", FF_LOGO_TYPE_IMAGE_ITERM,
|
||||
"chafa", FF_LOGO_TYPE_IMAGE_CHAFA,
|
||||
"raw", FF_LOGO_TYPE_IMAGE_RAW,
|
||||
"none", FF_LOGO_TYPE_NONE,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ typedef enum FFLogoType
|
||||
FF_LOGO_TYPE_IMAGE_ITERM, //image file, printed as iterm graphics protocol
|
||||
FF_LOGO_TYPE_IMAGE_CHAFA, //image file, printed as ascii art using libchafa
|
||||
FF_LOGO_TYPE_IMAGE_RAW, //image file, printed as raw binary string
|
||||
FF_LOGO_TYPE_NONE, //--logo none
|
||||
} FFLogoType;
|
||||
|
||||
typedef enum FFBinaryPrefixType
|
||||
|
||||
@@ -339,6 +339,8 @@ static void logoPrintKnownType(FFinstance* instance)
|
||||
else
|
||||
successfull = logoPrintFileIfExists(instance, false, true);
|
||||
}
|
||||
else if(instance->config.logo.type == FF_LOGO_TYPE_NONE)
|
||||
logoApplyColorsDetected(instance);
|
||||
else //image
|
||||
successfull = logoPrintImageIfExists(instance, instance->config.logo.type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user