diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2012-12-11 18:37:59 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2012-12-11 18:37:59 (GMT) |
commit | d8cd6a928b76dbe63afa82327c51715cb1a1bdc8 (patch) | |
tree | 1112ada32af0acadbde231bc9512624dd4cfd9d9 /src | |
parent | 637381ddaa49dbcb0f404e019e6cb7cadb6c18cf (diff) | |
download | fluxbox-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.cc | 3 |
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 | ||
116 | bool ThemeManager::load(const string &filename, | 116 | bool 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"); |