Commits

reiniero committed ee0e323

Fix for erroneously picking up empty settings.ini

  • Participants
  • Parent commits e34022b

Comments (0)

Files changed (1)

   try
     result:=-1; //no error
     try
-      // Get setting, converting relative paths (including e.g. ~/bla.ini) to
-      // absolute paths.
-      sIniFile:=ExpandFileNameUTF8(Options.GetOption('','inifile',''));
+      sIniFile:=(Options.GetOption('','inifile',''));
       if sIniFile<>'' then
       begin
+        // Get setting, converting relative paths (including e.g. ~/bla.ini) to
+        // absolute paths.
+        sIniFile:=ExpandFileNameUTF8(sIniFile);
         Options.IniFileSection:=Options.GetOption('','inisection','General');
         Options.CaseSensitive:=false; //easier when dealing with ini files
         // Setting this property loads the file: