From d8cd6a928b76dbe63afa82327c51715cb1a1bdc8 Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Tue, 11 Dec 2012 19:37:59 +0100 Subject: 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. --- src/FbTk/Theme.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { 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"); -- cgit v0.11.2