File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -133,20 +133,11 @@ namespace
133133 if (!file)
134134 configError (" missing or inaccessible file" , key, filename.c_str ());
135135
136- // skip first empty lines
137- do
138- {
139- if (feof (file))
140- break ;
141-
142- if (!temp.LoadFromFile (file))
143- break ;
144-
145- temp.alltrim (" \t\r " );
146- } while (temp.isEmpty ());
136+ if (temp.LoadFromFile (file))
137+ temp.alltrim (" \r " );
147138
148139 if (temp.isEmpty ())
149- configError (" empty file" , key, filename.c_str ());
140+ configError (" first empty line of file" , key, filename.c_str ());
150141 }
151142
152143 output = temp.c_str ();
@@ -167,6 +158,7 @@ namespace
167158 if (output.username .hasData ())
168159 configError (" multiple values" , output.database , " username" );
169160 parseExternalValue (key, value, output.username );
161+ output.username .rtrim (" " );
170162 }
171163 else if (key.find (" password" ) == 0 )
172164 {
You can’t perform that action at this time.
0 commit comments