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:
parent
637381ddaa
commit
d8cd6a928b
1 changed files with 2 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue