Skip to content

Commit

Permalink
Remove extra '/' in LoadLogo
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaV0lt committed Oct 26, 2023
1 parent 785c7b5 commit 8816236
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config.c
Expand Up @@ -907,7 +907,7 @@ void cFlatConfig::SetLogoPath(cString path) {
cString cFlatConfig::checkSlashAtEnd(std::string path) {
try {
if (!(path.at(path.size()-1) == '/'))
return cString::sprintf("%s/", path.c_str());
return cString::sprintf("%s/", path.c_str()); // Add '/' to path if not found
} catch (...) { return cString::sprintf("%s", path.c_str()); }
return cString::sprintf("%s", path.c_str());
}
Expand Down
10 changes: 5 additions & 5 deletions imageloader.c
Expand Up @@ -20,9 +20,9 @@ cImage* cImageLoader::LoadLogo(const char *logo, int width, int height) {

std::string logoLower = logo;
toLowerCase(logoLower);
cString File = cString::sprintf("%s/%s.%s", *Config.logoPath, logoLower.c_str(), *logoExtension);
cString File = cString::sprintf("%s%s.%s", *Config.logoPath, logoLower.c_str(), *logoExtension);
#ifdef DEBUGIMAGELOADTIME
dsyslog("flatPlus: ImageLoader load logo %s", *File);
dsyslog("flatPlus: ImageLoader LoadLogo %s", *File);
#endif

cImage *img;
Expand Down Expand Up @@ -79,7 +79,7 @@ cImage* cImageLoader::LoadIcon(const char *cIcon, int width, int height) {
cString File = cString::sprintf("%s%s/%s.%s", *Config.iconPath, Setup.OSDTheme, cIcon, *logoExtension);

#ifdef DEBUGIMAGELOADTIME
dsyslog("flatPlus: ImageLoader load icon %s", *File);
dsyslog("flatPlus: ImageLoader LoadIcon %s", *File);
#endif

cImage *img;
Expand Down Expand Up @@ -111,7 +111,7 @@ cImage* cImageLoader::LoadIcon(const char *cIcon, int width, int height) {
if (!success) {
File = cString::sprintf("%s%s/%s.%s", *Config.iconPath, "default", cIcon, *logoExtension);
#ifdef DEBUGIMAGELOADTIME
dsyslog("flatPlus: ImageLoader load icon %s", *File);
dsyslog("flatPlus: ImageLoader LoadIcon %s", *File);
uint32_t tick5 = GetMsTicks();
#endif

Expand Down Expand Up @@ -163,7 +163,7 @@ cImage* cImageLoader::LoadFile(const char *cFile, int width, int height) {

cString File = cFile;
#ifdef DEBUGIMAGELOADTIME
dsyslog("flatPlus: ImageLoader load file %s", *File);
dsyslog("flatPlus: ImageLoader LoadFile %s", *File);
#endif

cImage *img;
Expand Down

0 comments on commit 8816236

Please sign in to comment.