Skip to content

Commit

Permalink
Fix ini parsing error after dependency update
Browse files Browse the repository at this point in the history
  • Loading branch information
sorz committed Jan 9, 2024
1 parent bc0a4e8 commit ad84851
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ impl ServerListConfig {
if let Some(path) = &self.path {
let ini = Ini::load_from_file(path).context("cannot read server list file")?;
for (section, props) in ini.iter() {
if section.is_none() && props.is_empty() {
// `rust-ini` always return empty general section on 0.19 & 0.20
continue;
}
let server = self
.load_proxy_from_ini_section(section, props)
.with_context(|| {
Expand Down

0 comments on commit ad84851

Please sign in to comment.