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.
This commit is contained in:
Mathias Gumz 2012-12-11 19:37:59 +01:00
parent 637381ddaa
commit d8cd6a928b

View file

@ -115,12 +115,13 @@ bool ThemeManager::unregisterTheme(Theme &tm) {
bool ThemeManager::load(const string &filename,
const string &overlay_filename, int screen_num) {
string location = FbTk::StringUtil::expandFilename(filename);
StringUtil::removeTrailingWhitespace(location);
StringUtil::removeFirstWhitespace(location);
string prefix = "";
if (FileUtil::isDirectory(filename.c_str())) {
if (FileUtil::isDirectory(location.c_str())) {
prefix = location;
location.append("/theme.cfg");