Skip to content

Commit

Permalink
Skip files not ending in .xml in directories
Browse files Browse the repository at this point in the history
  • Loading branch information
jcronenberg committed Sep 25, 2024
1 parent a6257fd commit b784d5e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rust/migrate-wicked/src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ pub fn read(paths: Vec<String>) -> Result<InterfacesResult, anyhow::Error> {
if path.is_dir() {
let files = recurse_files(path)?;
for file in files {
match file.extension() {
None => continue,
Some(ext) => {
if !ext.eq("xml") {
continue;
}
}
}
let mut read_xml = read_xml_file(file)?;
if result.warning.is_none() && read_xml.warning.is_some() {
result.warning = read_xml.warning
Expand Down

0 comments on commit b784d5e

Please sign in to comment.