summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-04-10 17:15:16 +0200
committerlouis <louis.braun@gmx.de>2013-04-10 17:15:16 +0200
commit553d67045ed05184f98ee707b2b1fd2d38f45f60 (patch)
tree71c3bbb095142956815dc90406698f1e08c6a7bb /config.c
parente269a87fc24964fbaac485d6a60f3c331ed321a6 (diff)
downloadskin-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.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/config.c b/config.c
index d795033..084ba76 100644
--- a/config.c
+++ b/config.c
@@ -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);