Commit 0c9b7860 authored by Jan Möbius's avatar Jan Möbius
Browse files

Be more verbose on errors when loading ini files

git-svn-id: 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 68bfce67
......@@ -728,8 +728,24 @@ void Core::openIniFile( QString _filename,
QString sectionName = openFiles[i];
// Check if the string read is empty (e.g. colon at the end of the line ...)
// So skip trying to read files without a filename.
if ( sectionName.isEmpty() ) {
emit log(LOGWARN,tr("Warning from ini file parser: OpenFiles list contains empty string.") );
// Check if the specified section exists
if ( !ini.section_exists(sectionName) ) {
emit log(LOGERR,tr("Error parsing ini file. OpenFiles section %1 not found in File!").arg(sectionName));
QString path;
ini.get_entry( path, sectionName , "path" );
if ( !ini.get_entry( path, sectionName , "path" ) ) {
emit log(LOGERR,tr("Error parsing ini file. Section %1 contains no path description!").arg(sectionName));
//check if path is relative
if (path.startsWith( "." + OpenFlipper::Options::dirSeparator() )){
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment