aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2012-12-11 18:37:59 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2012-12-11 18:37:59 (GMT)
commitd8cd6a928b76dbe63afa82327c51715cb1a1bdc8 (patch)
tree1112ada32af0acadbde231bc9512624dd4cfd9d9 /src
parent637381ddaa49dbcb0f404e019e6cb7cadb6c18cf (diff)
downloadfluxbox-d8cd6a928b76dbe63afa82327c51715cb1a1bdc8.zip
fluxbox-d8cd6a928b76dbe63afa82327c51715cb1a1bdc8.tar.bz2
Fixed bug: use expanded style/theme filename
'filename' might contain a '~' which has to be expanded to work for regular system calls. We expanded 'filename' already but then did not use it. Fixes bug #3576586.
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/Theme.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/FbTk/Theme.cc b/src/FbTk/Theme.cc
index c252275..a62c8a6 100644
--- a/src/FbTk/Theme.cc
+++ b/src/FbTk/Theme.cc
@@ -115,12 +115,13 @@ bool ThemeManager::unregisterTheme(Theme &tm) {
115 115
116bool ThemeManager::load(const string &filename, 116bool ThemeManager::load(const string &filename,
117 const string &overlay_filename, int screen_num) { 117 const string &overlay_filename, int screen_num) {
118
118 string location = FbTk::StringUtil::expandFilename(filename); 119 string location = FbTk::StringUtil::expandFilename(filename);
119 StringUtil::removeTrailingWhitespace(location); 120 StringUtil::removeTrailingWhitespace(location);
120 StringUtil::removeFirstWhitespace(location); 121 StringUtil::removeFirstWhitespace(location);
121 string prefix = ""; 122 string prefix = "";
122 123
123 if (FileUtil::isDirectory(filename.c_str())) { 124 if (FileUtil::isDirectory(location.c_str())) {
124 prefix = location; 125 prefix = location;
125 126
126 location.append("/theme.cfg"); 127 location.append("/theme.cfg");