diff options
author | louis <louis.braun@gmx.de> | 2013-04-10 17:15:16 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-04-10 17:15:16 +0200 |
commit | 553d67045ed05184f98ee707b2b1fd2d38f45f60 (patch) | |
tree | 71c3bbb095142956815dc90406698f1e08c6a7bb /config.c | |
parent | e269a87fc24964fbaac485d6a60f3c331ed321a6 (diff) | |
download | skin-nopacity-553d67045ed05184f98ee707b2b1fd2d38f45f60.tar.gz skin-nopacity-553d67045ed05184f98ee707b2b1fd2d38f45f60.tar.bz2 |
check for Slash at end of startup path parameters
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -261,20 +261,29 @@ void cNopacityConfig::loadRssFeeds(void) { void cNopacityConfig::SetLogoPath(cString path) { - logoPath = path; + logoPath = checkSlashAtEnd(*path); logoPathSet = true; } void cNopacityConfig::SetIconPath(cString path) { - iconPath = path; + iconPath = checkSlashAtEnd(*path); iconPathSet = true; } void cNopacityConfig::SetEpgImagePath(cString path) { - epgImagePath = path; + epgImagePath = checkSlashAtEnd(*path); epgImagePathSet = true; } +cString cNopacityConfig::checkSlashAtEnd(std::string path) { + try { + if (!(path.at(path.size()-1) == '/')) + return cString::sprintf("%s/", path.c_str()); + } catch (...) {return path.c_str();} + return path.c_str(); +} + + bool cNopacityConfig::SetupParse(const char *Name, const char *Value) { if (strcmp(Name, "fontIndex") == 0) fontIndex = atoi(Value); else if (strcmp(Name, "channelFadeTime") == 0) channelFadeTime = atoi(Value); |